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

9 lines
287 B
Kotlin
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with '+= takeWhile{}'"
// INTENTION_TEXT_2: "Replace with '+= asSequence().takeWhile{}'"
fun foo(list: List<String>, target: MutableCollection<String>) {
<caret>for (s in list) {
if (s.isEmpty()) break
target.add(s)
}
}