Put arguments/parameters on separate/one line should update trailing comma

#KT-36411 Fixed
This commit is contained in:
Dmitry Gridin
2020-03-03 14:47:21 +07:00
parent 173f90c89c
commit b4898e4043
11 changed files with 102 additions and 9 deletions
@@ -0,0 +1,8 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
// REGISTRY: kotlin.formatter.allowTrailingCommaOnCallSite true
fun f() {
foo(<caret>1, "a", 2)
}
fun foo(p1: Int, p2: String, p3: Int){}
@@ -0,0 +1,12 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
// REGISTRY: kotlin.formatter.allowTrailingCommaOnCallSite true
fun f() {
foo(
1,
"a",
2,
)
}
fun foo(p1: Int, p2: String, p3: Int){}
@@ -0,0 +1,5 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
fun foo(p: Int, c: Char,
b: <caret>Boolean) {
}
@@ -0,0 +1,8 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
fun foo(
p: Int,
c: Char,
b: <caret>Boolean,
) {
}