11a3482970
#KT-38632 Fixed
12 lines
334 B
Plaintext
Vendored
12 lines
334 B
Plaintext
Vendored
// WITH_RUNTIME
|
|
// INTENTION_TEXT: "Replace with 'mapIndexed{}.sum()'"
|
|
// INTENTION_TEXT_2: "Replace with 'asSequence().mapIndexed{}.sum()'"
|
|
fun foo(list: List<Any>): Int {
|
|
val s = list
|
|
.mapIndexed { index, item -> getShort(index, item) }
|
|
.sum()
|
|
return s
|
|
}
|
|
|
|
fun getShort(index: Int, item: Any): Short = TODO()
|