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

9 lines
296 B
Kotlin
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'filter{}.mapTo(){}'"
// INTENTION_TEXT_2: "Replace with 'asSequence().filter{}.mapTo(){}'"
fun foo(list: List<String>, target: MutableList<Int>) {
<caret>for (s in list) {
if (s.length > 0)
target.add(s.hashCode())
}
}