KT-52551 Create a static initialization section in case of delegation to a property reference from a file class
This commit is contained in:
committed by
teamcity
parent
0b9e5e14be
commit
2ceccec2b8
Vendored
+11
@@ -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"
|
||||
Reference in New Issue
Block a user