blob: 6506b6d09b62ed6a5f9c0f42bfc94afee22e0a58 [file]
// LANGUAGE: +NestedClassesInAnnotations
// WITH_STDLIB
// 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"