Files
kotlin-fork/compiler/testData/codegen/box/jdk/kt1397.kt
T

14 lines
269 B
Kotlin
Vendored

// KJS_WITH_FULL_RUNTIME
// IGNORE_BACKEND: NATIVE
class IntArrayList(): ArrayList<Int>() {
override fun get(index: Int): Int = super.get(index)
}
fun box(): String {
val a = IntArrayList()
a.add(1)
a[0]++
return if (a[0] == 2) "OK" else "fail"
}