Files
kotlin-fork/idea/testData/quickfix/expressions/fixNullableWithExclExclAbsentWithBadIterator.kt
T
Valentin Kipyatkov 7625672914 Better test data
2016-09-23 10:07:15 +03:00

14 lines
380 B
Kotlin
Vendored

// "class org.jetbrains.kotlin.idea.quickfix.AddExclExclCallFix" "false"
// ACTION: Replace with a 'forEach' function call
// ACTION: Surround with null check
// 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) { }
}