Files
kotlin/compiler/testData/codegen/boxAgainstJava/annotations/javaAnnotationCall.kt
Denis Zharkov 29bf24b7d3 Use properties of Java annotations in codegen tests
Retain obsolete versions until support for methods in Java annotations is dropped
2015-04-23 08:27:42 +03:00

9 lines
313 B
Kotlin

JavaAnn("value") class MyClass
fun box(): String {
val ann = javaClass<MyClass>().getAnnotation(javaClass<JavaAnn>())
if (ann == null) return "fail: cannot find Ann on MyClass}"
if (ann.value != "value") return "fail: annotation parameter i should be 'value', but was ${ann.value}"
return "OK"
}