mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 08:31:29 +00:00
Includes changes to decompiled text Old syntax is used in builtins and project code for now
29 lines
535 B
Kotlin
29 lines
535 B
Kotlin
import java.lang.annotation.Retention
|
|
import java.lang.annotation.RetentionPolicy
|
|
import kotlin.platform.platformStatic
|
|
|
|
Retention(RetentionPolicy.RUNTIME)
|
|
annotation class testAnnotation
|
|
|
|
class A {
|
|
|
|
default 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"
|
|
} |