KT-52551 Create a static initialization section in case of delegation to a property reference from a file class

This commit is contained in:
Pavel Mikhailovskii
2022-05-27 19:41:59 +02:00
committed by teamcity
parent 0b9e5e14be
commit 2ceccec2b8
10 changed files with 64 additions and 1 deletions
@@ -0,0 +1,11 @@
// WITH_STDLIB
var initialized = false
object O {
val z = "OK"
init { initialized = true }
}
val x by O::z
fun box(): String = if (initialized) x else "Fail"