mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-09 00:21:47 +00:00
15 lines
352 B
Kotlin
Vendored
15 lines
352 B
Kotlin
Vendored
// TODO: muted automatically, investigate should it be ran for JS or not
|
|
// IGNORE_BACKEND: JS
|
|
|
|
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"
|
|
}
|