Files
kotlin/compiler/testData/codegen/boxWithJava/platformStatic/classObject/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

28 lines
517 B
Kotlin

import kotlin.platform.platformStatic
class A {
default object {
val b: String = "OK"
platformStatic val c: String = "OK"
platformStatic fun test1() = b
platformStatic fun test2() = b
platformStatic fun String.test3() = this + b
}
}
fun box(): String {
if (Test.test1() != "OK") return "fail 1"
if (Test.test2() != "OK") return "fail 2"
if (Test.test3() != "JAVAOK") return "fail 3"
if (Test.test4() != "OK") return "fail 4"
return "OK"
}