Files
kotlin/compiler/testData/codegen/boxWithJava/platformStatic/annotations/simpleClassObject.kt

29 lines
537 B
Kotlin

import java.lang.annotation.Retention
import java.lang.annotation.RetentionPolicy
import kotlin.platform.platformStatic
Retention(RetentionPolicy.RUNTIME)
annotation class testAnnotation
class A {
companion object {
val b: String = "OK"
platformStatic testAnnotation fun test1() = b
}
}
object B {
val b: String = "OK"
platformStatic testAnnotation fun test1() = b
}
fun box(): String {
if (Test.test1() != "OK") return "fail 1"
if (Test.test2() != "OK") return "fail 2"
return "OK"
}