Files
kotlin-fork/idea/testData/intentions/loopToCallChain/sum/sumByDouble.kt
T
Valentin Kipyatkov d0f6e25783 sum and sumBy supported
2016-08-23 22:47:42 +03:00

11 lines
224 B
Kotlin
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'sumByDouble{}'"
// IS_APPLICABLE_2: false
fun foo(list: List<String>): Double {
var s = 0.0
<caret>for (item in list) {
s += item.length
}
return s
}