Files
kotlin/compiler/testData/codegen/box/builtinStubMethods/IteratorWithRemove.kt
2018-06-09 19:15:38 +03:00

16 lines
385 B
Kotlin
Vendored

// IGNORE_BACKEND: JS_IR
// 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"
}