Files
kotlin-fork/idea/testData/quickfix/addExclExclCall/iterableWithBadIterator.fir.kt.after
T
Mark Punzalan 1d9247ae0f FIR IDE: Offer AddExclExclCallFix for nullable types with an
`iterator()` function that does NOT have `operator` modifier.

This is different from FE1.0. Adding `!!` will then surface the error
that `operator` modifier needs to be added (with corresponding fix).
2021-05-20 20:32:58 +02:00

11 lines
173 B
Plaintext
Vendored

// "Add non-null asserted (!!) call" "true"
class Some {
fun iterator(): Iterator<Int> = null!!
}
fun foo() {
val test: Some? = Some()
for (i in test!!) { }
}