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

13 lines
296 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'any{}'"
// IS_APPLICABLE_2: false
fun foo(list: List<String>, p: Int) {
var found: Boolean
if (p > 0) {
println("Starting the search")
<caret>found = list.any { it.length > 0 }
}
else {
found = true
}
}