blob: 8dea3327d3efbcb51f33befd023713019f1f9d62 [file] [log] [blame]
// !LANGUAGE: +NestedClassesInAnnotations
// WITH_RUNTIME
// TARGET_BACKEND: JVM
// FILE: Foo.java
@Anno(Anno.CONST)
public class Foo {}
// FILE: Anno.kt
annotation class Anno(val value: Int) {
companion object {
const val CONST = 42
}
}
fun box(): String =
if ((Foo::class.java.annotations.single() as Anno).value == 42) "OK" else "Fail"