Files
kotlin-fork/idea/testData/intentions/loopToCallChain/maxMin/KT14210.kt.after2
T
Dmitry Gridin 11a3482970 tests: apply official code style
#KT-38632 Fixed
2020-05-07 12:36:44 +00:00

10 lines
271 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
.asSequence()
.filter { it % 2 == 0 }
.max()
?: -1
}