Files
kotlin/compiler/testData/codegen/boxWithJava/platformStatic/annotations/simpleClassObject.kt
Pavel V. Talanov 59f192ef90 Replace 'class object' with 'default object' in renderers and test data
Includes changes to decompiled text
Old syntax is used in builtins and project code for now
2015-03-06 19:36:54 +03:00

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"
}