Files
kotlin-fork/compiler/testData/diagnostics/tests/controlStructures/forWithNullableIterator.fir.kt
T
2021-04-19 15:10:58 +03:00

12 lines
204 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!>Coll()<!>) {}
}