Basic support for "add" to collection used inside the loop
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
// WITH_RUNTIME
|
||||
import java.util.HashSet
|
||||
|
||||
fun foo(map: Map<Int, String>): Collection<Int> {
|
||||
<caret>val result = map.values
|
||||
.map { it.length }
|
||||
.toSet()
|
||||
return result
|
||||
}
|
||||
Reference in New Issue
Block a user