// "Create function 'iterator' from usage" "true" class Foo { fun iterator(): Iterator { throw UnsupportedOperationException("not implemented") //To change body of created functions use File | Settings | File Templates. } } fun foo() { for (i: Int in Foo()) { } }