1b5ebd83de
^KT-43222 fixed
32 lines
544 B
Kotlin
Vendored
32 lines
544 B
Kotlin
Vendored
// TARGET_BACKEND: JS_IR
|
|
// PROPERTY_LAZY_INITIALISATION
|
|
|
|
// FILE: A.kt
|
|
|
|
val a = "A"
|
|
|
|
// FILE: B.kt
|
|
val b = "B".apply {}
|
|
|
|
val c = b
|
|
|
|
// FILE: C.kt
|
|
val d = "D".apply {}
|
|
|
|
val e = d
|
|
|
|
// FILE: main.kt
|
|
|
|
fun box(): String {
|
|
d
|
|
e
|
|
return if (
|
|
js("a") === "A" &&
|
|
js("typeof b") == "undefined" &&
|
|
js("typeof c") == "undefined" &&
|
|
js("d") === "D" &&
|
|
js("e") === "D"
|
|
)
|
|
"OK"
|
|
else "a = ${js("a")}; typeof b = ${js("typeof b")}; typeof c = ${js("typeof c")}; d = ${js("d")}; e = ${js("e")}"
|
|
} |