Files
kotlin-fork/idea/testData/formatter/callChain/CallChainWrappingInElvis.kt
T
Dmitry Gridin b6b755506c Formatter: support Chop down if long for Chained method calls
#KT-23929 Fixed
#KT-33553 Fixed
2019-11-26 19:40:51 +07:00

8 lines
221 B
Kotlin
Vendored

fun f(list: List<Int>) {
val result = list.filter { it % 2 == 0 }.max() ?: -1
list.filter { it % 2 == 0 }.max()
?: -1
}
// SET_INT: METHOD_CALL_CHAIN_WRAP = 2
// SET_FALSE: WRAP_FIRST_METHOD_IN_CALL_CHAIN