Files
kotlin-fork/idea/testData/intentions/loopToCallChain/indexWithNestedLoop.kt.after
T
2016-08-16 17:38:04 +03:00

8 lines
286 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with '+= ...filterNot{}.mapIndexed{}'"
fun foo(list: List<String>, target: MutableCollection<Int>) {
<caret>target += list
.flatMap { it.indices }
.filterNot { it == 10 }
.mapIndexed { i, j -> i + j }
}