Files
kotlin/compiler/testData/codegen/boxWithJava/platformStatic/annotations/simpleClassObject.kt
2015-08-21 16:59:05 +02:00

26 lines
441 B
Kotlin
Vendored

import kotlin.jvm.jvmStatic
annotation(retention = AnnotationRetention.RUNTIME) class testAnnotation
class A {
companion object {
val b: String = "OK"
jvmStatic testAnnotation fun test1() = b
}
}
object B {
val b: String = "OK"
jvmStatic testAnnotation fun test1() = b
}
fun box(): String {
if (Test.test1() != "OK") return "fail 1"
if (Test.test2() != "OK") return "fail 2"
return "OK"
}