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