Properly capture local delegated properties in object constructor
#KT-23117 Fixed
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
// IGNORE_BACKEND: JS_IR, JVM_IR
|
||||
//WITH_RUNTIME
|
||||
import kotlin.properties.Delegates.notNull
|
||||
|
||||
fun box(): String {
|
||||
var bunny by notNull<String>()
|
||||
|
||||
val obj = object {
|
||||
val getBunny = { bunny }
|
||||
}
|
||||
|
||||
bunny = "OK"
|
||||
return obj.getBunny()
|
||||
}
|
||||
Reference in New Issue
Block a user