[JS IR & WASM] Fix executing init blocks for enums with nested objects
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user