[JS IR] Eager initialisation for all pure properties

^KT-43222 fixed
This commit is contained in:
Ilya Goncharov
2020-11-09 15:30:37 +03:00
parent 3da9761f37
commit d6bc309c94
4 changed files with 36 additions and 1 deletions
@@ -0,0 +1,18 @@
// TARGET_BACKEND: JS_IR
// FILE: A.kt
val a = "A"
// FILE: B.kt
val b = "B".apply {}
val c = "C"
// FILE: main.kt
fun box(): String {
return if (js("a") == "A" && js("typeof b") == "undefined" && js("typeof c") == "undefined")
"OK"
else "fail"
}