takeWhile supported

This commit is contained in:
Valentin Kipyatkov
2016-04-21 22:06:09 +03:00
parent 9ff0f4d736
commit 3f563f7058
6 changed files with 84 additions and 5 deletions
@@ -0,0 +1,7 @@
// 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 }
}