11a3482970
#KT-38632 Fixed
9 lines
343 B
Plaintext
Vendored
9 lines
343 B
Plaintext
Vendored
// WITH_RUNTIME
|
|
// INTENTION_TEXT: "Replace with '+= flatMap{}.takeWhile{}'"
|
|
// INTENTION_TEXT_2: "Replace with '+= asSequence().flatMap{}.takeWhile{}'"
|
|
fun foo(list: List<String>, target: MutableCollection<Int>) {
|
|
<caret>target += list
|
|
.asSequence()
|
|
.flatMap { it.indices.asSequence() }
|
|
.takeWhile { it <= 1000 }
|
|
} |