Files
kotlin-fork/idea/testData/intentions/loopToCallChain/takeWhile_nestedLoop.kt
T
Valentin Kipyatkov 3f563f7058 takeWhile supported
2016-08-16 17:38:06 +03:00

11 lines
291 B
Kotlin
Vendored

// 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)
}
}
}