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

18 lines
261 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
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
}