Formatter: support Chop down if long for Chained method calls
#KT-23929 Fixed #KT-33553 Fixed
This commit is contained in:
@@ -2,7 +2,9 @@ val x = foo.bar()
|
||||
.baz()
|
||||
.quux()
|
||||
|
||||
val y = xyzzy(foo.bar().baz().quux())
|
||||
val y = xyzzy(foo.bar()
|
||||
.baz()
|
||||
.quux())
|
||||
|
||||
fun foo() {
|
||||
foo.bar()
|
||||
@@ -22,5 +24,21 @@ fun foo() {
|
||||
.quux()
|
||||
}
|
||||
|
||||
fun top() = "".plus("")
|
||||
.plus("")
|
||||
|
||||
class C {
|
||||
fun member() = "".plus("")
|
||||
.plus("")
|
||||
}
|
||||
|
||||
fun foo() {
|
||||
fun local() = "".plus("")
|
||||
.plus("")
|
||||
|
||||
val anonymous = fun() = "".plus("")
|
||||
.plus("")
|
||||
}
|
||||
|
||||
// SET_INT: METHOD_CALL_CHAIN_WRAP = 2
|
||||
// SET_FALSE: WRAP_FIRST_METHOD_IN_CALL_CHAIN
|
||||
Reference in New Issue
Block a user