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

10 lines
231 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'sumBy{}'"
// IS_APPLICABLE_2: false
fun foo(list: List<String>): Int {
val <caret>l = list.sumBy { it.getShort().toInt() }
return l
}
fun String.getShort(): Short = TODO()