Files
kotlin/compiler/testData/codegen/box/builtinStubMethods/extendJavaCollections/abstractList.kt
2016-11-21 18:20:33 +03:00

23 lines
352 B
Kotlin
Vendored

// 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"
}