Files
kotlin-fork/idea/testData/intentions/loopToCallChain/takeWhile_nestedLoop.kt.after
T

7 lines
240 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with '+= flatMap{}.takeWhile{}'"
fun foo(list: List<String>, target: MutableCollection<Int>) {
<caret>target += list
.flatMap { it.indices }
.takeWhile { it <= 1000 }
}