mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
21 lines
295 B
Kotlin
Vendored
21 lines
295 B
Kotlin
Vendored
import java.util.*
|
|
import java.io.*
|
|
|
|
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"
|
|
}
|