Files
kotlin-fork/idea/testData/intentions/loopToCallChain/count/nonConstantInitial.kt
T
2016-08-23 22:47:42 +03:00

14 lines
276 B
Kotlin
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'count{}'"
// IS_APPLICABLE_2: false
fun foo(list: List<String>): Int {
var count = bar()
<caret>for (s in list) {
if (s.isNotBlank()) {
count++
}
}
return count
}
fun bar(): Int = 0