mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-13 00:21:28 +00:00
13 lines
263 B
Kotlin
13 lines
263 B
Kotlin
// "Create function 'next'" "true"
|
|
class FooIterator<T> {
|
|
fun hasNext(): Boolean { return false }
|
|
}
|
|
class Foo<T> {
|
|
fun iterator(): FooIterator<T> {
|
|
throw Exception("not implemented")
|
|
}
|
|
}
|
|
fun foo() {
|
|
for (i: Int in Foo<caret><Int>()) { }
|
|
}
|