Files
kotlin-fork/backend.native/tests/external/codegen/box/objects/interfaceCompanion.kt
T
2017-11-16 17:21:48 +03:00

19 lines
271 B
Kotlin

var result = ""
interface 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
}