Files
kotlin/idea/testData/quickfix/createFromUsage/createFunction/next/createNextFromUsage2.kt.after

17 lines
456 B
Plaintext
Vendored

// "Create member function 'next'" "true"
class FooIterator<T> {
operator fun hasNext(): Boolean { return false }
operator fun next(): T {
throw UnsupportedOperationException("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: Int in Foo<Int>()) { }
}