summaryrefslogtreecommitdiff
path: root/plugins/kotlin/idea/tests/testData/intentions/convertToIndexedFunctionCall/basic/reduceRightOrNull.kt.after
blob: c07cc659f1fbfaf2e718d163dc915a3a4f30f7ad (plain)
1
2
3
4
5
6
7
8
9
10
11
// INTENTION_TEXT: "Convert to 'reduceRightIndexedOrNull'"
// 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.reduceRightIndexedOrNull { index, s, acc ->
        s + acc
    }
}