Properly capture local delegated properties in object constructor

#KT-23117 Fixed
This commit is contained in:
Mikhael Bogdanov
2019-02-05 13:45:35 +01:00
parent 9ab6062295
commit b2606735c5
7 changed files with 48 additions and 3 deletions
@@ -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()
}