11a3482970
#KT-38632 Fixed
12 lines
394 B
Plaintext
Vendored
12 lines
394 B
Plaintext
Vendored
// WITH_RUNTIME
|
|
// INTENTION_TEXT: "Replace with 'filter{}.mapTo(){}'"
|
|
// INTENTION_TEXT_2: "Replace with 'asSequence().filter{}.mapTo(){}'"
|
|
fun foo(list: List<String>): List<Int> {
|
|
val target = createCollection()
|
|
<caret>list
|
|
.filter { it.length > 0 }
|
|
.mapTo(target) { it.hashCode() }
|
|
return target
|
|
}
|
|
|
|
fun createCollection(): MutableList<Int> = java.util.ArrayList() |