Files
kotlin-fork/compiler/testData/codegen/box/properties/kt4140.kt
T
2019-11-19 11:00:09 +03:00

17 lines
269 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
class TestObject()
{
companion object {
var prop: Int = 1
get() = field++
}
}
fun box(): String {
if (TestObject.prop != 1) return "fail 1"
if (TestObject.prop != 2) return "fail 2"
return "OK"
}