Files
kotlin-fork/compiler/testData/codegen/box/classes/initializerBlockDImpl.kt
T
2020-11-09 16:04:43 +03:00

22 lines
372 B
Kotlin
Vendored

// DONT_TARGET_EXACT_BACKEND: WASM
// WASM_MUTE_REASON: STDLIB_COLLECTIONS
// KJS_WITH_FULL_RUNTIME
// WITH_RUNTIME
class World() {
public val items: ArrayList<Item> = ArrayList<Item>()
inner class Item() {
init {
items.add(this)
}
}
val foo = Item()
}
fun box() : String {
val w = World()
if (w.items.size != 1) return "fail"
return "OK"
}