Files
kotlin/compiler/testData/codegen/box/delegatedProperty/delegateWithPrivateSet.kt

15 lines
288 B
Kotlin
Vendored

// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
// See KT-10107: 'Variable must be initialized' for delegate with private set
class My {
var delegate: String by kotlin.properties.Delegates.notNull()
private set
init {
delegate = "OK"
}
}
fun box() = My().delegate