Files
kotlin-fork/compiler/testData/diagnostics/tests/controlStructures/forLoopWithNullableRange.kt
T
2012-08-24 19:49:33 +04:00

16 lines
205 B
Kotlin

class Coll {
fun iterator(): It = It()
}
class It {
fun next() = 1
fun hasNext() = false
}
fun test(c: Coll?) {
for (x in <!ITERATOR_MISSING!>c<!>) {}
if (c != null) {
for(x in c) {}
}
}