Files
kotlin-fork/compiler/testData/codegen/box/properties/lateinit/privateSetterFromLambda.kt
T
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

13 lines
212 B
Kotlin
Vendored

class My {
lateinit var x: String
private set
fun init(arg: String, f: (String) -> String) { x = f(arg) }
}
fun box(): String {
val my = My()
my.init("O") { it + "K" }
return my.x
}