Merging loop with initialization before in more cases + better formatting

This commit is contained in:
Valentin Kipyatkov
2016-04-22 16:17:19 +03:00
parent 5ddac24cdd
commit e8904d7727
5 changed files with 48 additions and 13 deletions
@@ -0,0 +1,15 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'map{}'"
import java.util.*
fun foo(list: List<String>) {
val result = ArrayList<Int>()
bar()
<caret>for (s in list) {
result.add(s.length)
}
}
fun bar(){}