Files
kotlin-fork/idea/testData/intentions/loopToCallChain/flatMapTo3.kt.after
T
2016-08-16 17:38:02 +03:00

9 lines
270 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'flatMapTo(){}'"
fun foo(list: List<String>): List<String> {
val target = createCollection()
<caret>list.flatMapTo(target) { it.lines() }
return target
}
fun createCollection() = java.util.ArrayList<String>()