Files
kotlin-fork/idea/testData/intentions/loopToCallChain/maxMin/max3.kt.after2
T
2021-04-07 07:49:23 +03:00

14 lines
388 B
Plaintext
Vendored

// WITH_RUNTIME
// INTENTION_TEXT: "Replace with 'map{}.maxOrNull()'"
// INTENTION_TEXT_2: "Replace with 'asSequence().map{}.maxOrNull()'"
fun getMaxLineWidth(lineCount: Int): Float {
val <caret>max_width = (0..lineCount - 1)
.asSequence()
.map { getLineWidth(it) }
.maxOrNull()
?: 0.0f
return max_width
}
fun getLineWidth(i: Int): Float = TODO()