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,11 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with '+= flatMap{}.takeWhile{}'"
fun foo(list: List<String>, target: MutableCollection<Int>) {
Outer@
<caret>for (s in list) {
for (i in s.indices) {
if (i > 1000) break@Outer
target.add(i)
}
}
}