summaryrefslogtreecommitdiff
path: root/plugins/kotlin/idea/tests/testData/intentions/convertToIndexedFunctionCall/basic/scanReduce.kt
blob: af3d35641a2852751e566d03b963d3e981dd4265 (plain)
1
2
3
4
5
6
7
8
9
10
11
// INTENTION_TEXT: "Convert to 'runningReduceIndexed'"
// WITH_RUNTIME
// DISABLE-ERRORS
// TODO: fix warning?
// AFTER-WARNING: Parameter 'index' is never used, could be renamed to _
@OptIn(ExperimentalStdlibApi::class)
fun test(list: List<String>) {
    list.<caret>runningReduce { acc, s ->
        acc + s
    }
}