Files
kotlin-fork/idea/testData/intentions/loopToCallChain/takeWhile/nestedLoop.kt
T
2016-08-23 22:47:42 +03:00

12 lines
367 B
Kotlin
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>) {
Outer@
<caret>for (s in list) {
for (i in s.indices) {
if (i > 1000) break@Outer
target.add(i)
}
}
}