Files
kotlin-fork/js/js.translator/testData/box/examples/initializerBlockDImpl.kt
T
2018-07-12 14:18:34 +03:00

21 lines
344 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// EXPECTED_REACHABLE_NODES: 1517
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"
}