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

12 lines
296 B
Kotlin
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'toMutableSet()'"
// IS_APPLICABLE_2: false
import java.util.HashSet
fun foo(map: Map<Int, String>): MutableCollection<String> {
val result = HashSet<String>()
<caret>for (s in map.values) {
result.add(s)
}
return result
}