Files
kotlin/compiler/testData/diagnostics/tests/controlStructures/forWithNullableIterator.kt
2015-09-25 19:20:20 +03:00

12 lines
226 B
Kotlin
Vendored

class Coll {
operator fun iterator(): It? = null
}
class It {
operator fun next() = 1
operator fun hasNext() = false
}
fun test() {
for (x in <!HAS_NEXT_FUNCTION_NONE_APPLICABLE, NEXT_NONE_APPLICABLE!>Coll()<!>) {}
}