6cb0e5151c
Intrinsics for is/as/as? with mutable Kotlin collections and related types.
12 lines
256 B
Kotlin
Vendored
12 lines
256 B
Kotlin
Vendored
class MyIterator<T>(val v: T): Iterator<T> {
|
|
override fun next(): T = v
|
|
override fun hasNext(): Boolean = true
|
|
|
|
public fun remove() {}
|
|
}
|
|
|
|
fun box(): String {
|
|
(MyIterator<String>("") as java.util.Iterator<String>).remove()
|
|
return "OK"
|
|
}
|