mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-12 00:21:32 +00:00
19 lines
469 B
Plaintext
Vendored
19 lines
469 B
Plaintext
Vendored
// "Create member function 'FooIterator.hasNext'" "true"
|
|
class FooIterator<T> {
|
|
operator fun next(): T {
|
|
throw Exception("not implemented")
|
|
}
|
|
|
|
operator fun hasNext(): Boolean {
|
|
TODO("not implemented") //To change body of created functions use File | Settings | File Templates.
|
|
}
|
|
}
|
|
class Foo<T> {
|
|
operator fun iterator(): FooIterator<T> {
|
|
throw Exception("not implemented")
|
|
}
|
|
}
|
|
fun foo() {
|
|
for (i in Foo<Int>()) { }
|
|
}
|