c7435ba760
We are going to deprecate `WITH_RUNTIME` directive. The main reason behind this change is that `WITH_STDLIB` directive better describes its meaning, specifically it will add kotlin stdlib to test's classpath.
24 lines
484 B
Kotlin
Vendored
24 lines
484 B
Kotlin
Vendored
// TARGET_BACKEND: JVM
|
|
|
|
// WITH_STDLIB
|
|
|
|
@Ann(A.B.i) class MyClass
|
|
|
|
fun box(): String {
|
|
val ann = MyClass::class.java.getAnnotation(Ann::class.java)
|
|
if (ann == null) return "fail: cannot find Ann on MyClass}"
|
|
if (ann.i != 1) return "fail: annotation parameter i should be 1, but was ${ann.i}"
|
|
return "OK"
|
|
}
|
|
|
|
@Retention(AnnotationRetention.RUNTIME)
|
|
annotation class Ann(val i: Int)
|
|
|
|
class A {
|
|
class B {
|
|
companion object {
|
|
const val i = 1
|
|
}
|
|
}
|
|
}
|