Files
kotlin-fork/compiler/testData/compileKotlinAgainstKotlin/KotlinPropertyAsAnnotationParameter.B.kt
T
Alexander Udalov c575ad9fb0 Fix test, remove duplicate annotation
It started to fail only now because KClassImpl constructor is now loading
class' annotations (previously annotations weren't loaded by Java reflection)
2014-07-02 01:55:54 +04:00

29 lines
666 B
Kotlin

import java.lang.annotation.Retention
import java.lang.annotation.RetentionPolicy
import a.*
Ann(i, s, f, d, l, b, bool, c, str)
class MyClass1
Ann(i2, s2, f2, d2, l2, b2, bool2, c2, str2)
class MyClass2
Retention(RetentionPolicy.RUNTIME)
annotation class Ann(
val i: Int,
val s: Short,
val f: Float,
val d: Double,
val l: Long,
val b: Byte,
val bool: Boolean,
val c: Char,
val str: String
)
fun main(args: Array<String>) {
// Trigger annotation loading
(MyClass1() as java.lang.Object).getClass().getAnnotations()
(MyClass2() as java.lang.Object).getClass().getAnnotations()
}