Basic support for "add" to collection used inside the loop

This commit is contained in:
Valentin Kipyatkov
2016-04-06 19:20:08 +03:00
parent d3721e9462
commit f51c5a19dd
20 changed files with 272 additions and 46 deletions
@@ -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
}