mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 08:31:28 +00:00
12 lines
256 B
Kotlin
Vendored
12 lines
256 B
Kotlin
Vendored
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"
|
|
}
|