Files
kotlin-fork/compiler/testData/codegen/box/jdk/kt1397.kt
T
2020-04-27 11:50:24 +03:00

15 lines
299 B
Kotlin
Vendored

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