blob: 46de422a7e6737f64c1928c5520f637ae95d38e2 [file] [log] [blame]
// 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
.flatMap { it.indices }
.takeWhile { it <= 1000 }
}