Do not remove import for iterator()

This commit is contained in:
Natalia.Ukhorskaya
2013-03-14 14:45:53 +04:00
parent 635f65e23d
commit 5bdd52c65f
5 changed files with 56 additions and 0 deletions
@@ -0,0 +1,7 @@
import test1.MyClass
import test1.iterator
fun foo() {
val s = MyClass()
for (i in s) {}
}
@@ -0,0 +1,7 @@
import test1.MyClass
import test1.iterator
fun foo() {
val s = MyClass()
for (i in s) {}
}
@@ -0,0 +1,15 @@
package test1
public class MyClass {
}
public fun MyClass.iterator(): Iterator<MyClass> {
return object: Iterator<MyClass> {
override fun next(): MyClass {
throw Exception()
}
override fun hasNext(): Boolean {
throw Exception()
}
}
}