summaryrefslogtreecommitdiff
path: root/plugins/kotlin/idea/tests/testData/intentions/convertToIndexedFunctionCall/basic/runningReduce.kt
blob: 240fc096fa5ec946884f3dd0a2dc54f4961f182a (plain)
1
2
3
4
5
6
7
8
9
10
11
// INTENTION_TEXT: "Convert to 'runningReduceIndexed'"
// WITH_RUNTIME
// AFTER-WARNING: This annotation should be used with the compiler argument '-opt-in=kotlin.RequiresOptIn'
// 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
    }
}