Formatter: support Chop down if long for Chained method calls

#KT-23929 Fixed
#KT-33553 Fixed
This commit is contained in:
Dmitry Gridin
2019-11-11 14:33:04 +07:00
parent 351fef5628
commit b6b755506c
13 changed files with 726 additions and 54 deletions
@@ -0,0 +1,10 @@
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