Files
kotlin/compiler/testData/diagnostics/tests/controlStructures/forLoopWithNullableRange.kt
2014-10-01 18:52:52 +04:00

16 lines
232 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 <!DEBUG_INFO_SMARTCAST!>c<!>) {}
}
}