Files
kotlin/idea/testData/quickfix/createFromUsage/createFunction/hasNext/createHasNextFromUsage2.kt.after

19 lines
488 B
Plaintext
Vendored

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