// "Create function 'hasNext' from usage" "true" class FooIterator { fun next(): T { throw Exception("not implemented") } } class Foo { fun iterator(): FooIterator { throw Exception("not implemented") } } fun foo() { for (i in Foo()) { } }