Files
kotlin-fork/backend.native/tests/external/codegen/blackbox/builtinStubMethods/IteratorWithRemove.kt
T

15 lines
360 B
Kotlin

// TODO: muted automatically, investigate should it be ran for JS or not
// IGNORE_BACKEND: JS, NATIVE
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"
}