Files
kotlin-fork/compiler/testData/codegen/box/objects/classCompanion.kt
T
2020-03-10 15:19:34 +03:00

19 lines
267 B
Kotlin
Vendored

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
}