[JS IR & WASM] Fix executing init blocks for enums with nested objects

This commit is contained in:
Sergej Jaskiewicz
2021-10-13 17:06:32 +03:00
committed by Space
parent 8e0e2fe52c
commit 9e5520bba8
11 changed files with 164 additions and 34 deletions
@@ -0,0 +1,22 @@
// TARGET_BACKEND: JS
// TARGET_BACKEND: JS_IR
// TARGET_BACKEND: JS_IR_ES6
// TARGET_BACKEND: WASM
var l = ""
enum class Foo {
F;
init {
l += "Foo;"
}
object L {
init {
l += "Foo.CO;"
}
}
}
fun box(): String {
Foo.L
return if (l != "Foo;Foo.CO;") "FAIL: ${l}" else "OK"
}