sum and sumBy supported

This commit is contained in:
Valentin Kipyatkov
2016-08-18 20:19:35 +03:00
parent 7c92f7974f
commit d0f6e25783
40 changed files with 682 additions and 6 deletions
@@ -0,0 +1,10 @@
// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'map{}.sum()'"
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.sum()'"
fun foo(list: List<Int>): Long {
var s = 0L
<caret>for (item in list) {
s += item
}
return s
}