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

8 lines
226 B
Kotlin
Vendored

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