Files
kotlin-fork/idea/testData/intentions/loopToCallChain/maxMin/KT14210.kt.after
T
2016-10-24 18:32:02 +03:00

9 lines
261 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'filter{}.max()'"
// INTENTION_TEXT_2: "Replace with 'asSequence().filter{}.max()'"
fun f(list: List<Int>) {
val <caret>result = list
.filter { it % 2 == 0 }
.max()
?: -1
}