a89ef54578
#KT-14210 Fixed
10 lines
298 B
Kotlin
Vendored
10 lines
298 B
Kotlin
Vendored
// WITH_RUNTIME
|
|
// INTENTION_TEXT: "Replace with 'filter{}.max()'"
|
|
// INTENTION_TEXT_2: "Replace with 'asSequence().filter{}.max()'"
|
|
fun f(list: List<Int>) {
|
|
var result = -1
|
|
<caret>for (item in list)
|
|
if (item % 2 == 0)
|
|
if (result <= item)
|
|
result = item
|
|
} |