Files
kotlin/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractList.kt
2019-11-19 11:00:09 +03:00

24 lines
382 B
Kotlin
Vendored

// IGNORE_BACKEND_FIR: JVM_IR
// TARGET_BACKEND: JVM
import java.util.AbstractList
class A : AbstractList<String>() {
override fun get(index: Int): String = ""
override val size: Int get() = 0
}
fun box(): String {
val a = A()
val b = A()
a.addAll(b)
a.addAll(0, b)
a.removeAll(b)
a.retainAll(b)
a.clear()
a.remove("")
return "OK"
}