Added for iterator when remove() is present.

This commit is contained in:
Evgeny Gerashchenko
2013-09-25 00:08:30 +04:00
parent 47b70427e1
commit 5de9c2499d
2 changed files with 16 additions and 0 deletions
@@ -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"
}