Files
kotlin-fork/compiler/testData/codegen/box/properties/backingField/lateinitBackingFields.kt
T
2023-03-27 10:32:19 +00:00

20 lines
297 B
Kotlin
Vendored

// TARGET_BACKEND: JVM_IR
// IGNORE_BACKEND_K1: JVM_IR
var that: Int
lateinit field: String
get() = field.length
set(value) {
field = value.toString()
}
fun box(): String {
that = 1
return if (that == 1) {
"OK"
} else {
"fail: $that"
}
}