Files
kotlin/compiler/testData/codegen/box/builtinStubMethods/IteratorWithRemove.kt
2013-09-25 20:59:23 +04:00

12 lines
253 B
Kotlin

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 MutableIterator<String>).remove()
return "OK"
}