Files
kotlin-fork/idea/testData/intentions/loopToCallChain/count/countNotNull.kt
T

12 lines
232 B
Kotlin
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'count{}'"
// IS_APPLICABLE_2: false
fun f11(list: List<Any?>): Int{
var c = 0
<caret>for (d in list) {
if (d != null) {
c++
}
}
return c
}