Report errors when iterator() returns a nullable type

This commit is contained in:
Andrey Breslav
2012-08-24 19:20:53 +04:00
parent b6f15b518a
commit c0c2ca0ac2
11 changed files with 54 additions and 45 deletions
@@ -0,0 +1,12 @@
class Coll {
fun iterator(): It? = null
}
class It {
fun next() = 1
fun hasNext() = false
}
fun test() {
for (x in <!HAS_NEXT_FUNCTION_NONE_APPLICABLE, NEXT_NONE_APPLICABLE!>Coll()<!>) {}
}