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

10 lines
248 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'map{}.toSet()'"
import java.util.HashSet
fun foo(map: Map<Int, String>): Collection<Int> {
val <caret>result = map.values
.map { it.length }
.toSet()
return result
}