// "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 in Foo()) { bar(i) } } fun bar(i: String) { }