Files
kotlin/compiler/testData/codegen/box/properties/lateinit/privateSetterViaSubclass.kt
Anton Bannykh 8e347f9f39 [JS IR BE] lateinit support
* Functions with IrExpressionBody are lowered to IrBlockBody
* Implemented throwUninitializedPropertyAccessException function
2018-09-21 18:20:11 +03:00

17 lines
231 B
Kotlin
Vendored

open class A {
lateinit var x: String
private set
protected fun set(value: String) { x = value }
}
class B : A() {
fun init() { set("OK") }
}
fun box(): String {
val b = B()
b.init()
return b.x
}