Files
kotlin/compiler/testData/codegen/box/objects/classCompanion.kt
2019-11-19 11:00:09 +03:00

20 lines
297 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
var result = ""
class A {
companion object {
val prop = test()
fun test(): String {
result += "OK"
return result
}
}
}
fun box(): String {
if (A.prop != "OK") return "fail ${A.prop}"
return result
}