Files
kotlin/compiler/testData/codegen/box/classes/initializerBlockDImpl.kt
2019-11-19 11:00:09 +03:00

21 lines
327 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// 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"
}