Files
kotlin-fork/idea/testData/quickfix/expressions/fixNullableWithExclExclAbsentWithBadIterator.kt
T
2016-02-02 08:17:49 +03:00

13 lines
314 B
Kotlin
Vendored

// "Add non-null asserted (!!) call" "false"
// ACTION: Replace with a 'forEach' function call
// ERROR: Not nullable value required to call an iterator() method on for-loop range
class Some {
fun iterator(): Iterator<Int> = null!!
}
fun foo() {
val test: Some? = Some()
for (i in <caret>test) { }
}