Files
kotlin-fork/idea/testData/quickfix/expressions/fixNullableWithExclExclAbsentWithBadIterator.kt
T
2015-10-28 13:39:49 +03:00

13 lines
285 B
Kotlin
Vendored

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