Added for iterator when remove() is present.
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
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"
|
||||
}
|
||||
Reference in New Issue
Block a user