Move call-site trailing comma to registry

#KT-34744
This commit is contained in:
Dmitry Gridin
2020-02-03 16:44:13 +07:00
parent c34b417d0c
commit b5d0956a5e
45 changed files with 5022 additions and 1422 deletions
@@ -25,7 +25,7 @@ fun foo() {
foofoo
]
testtest[foofoo]
testtest[foofoo, ]
testtest[foofoo, testtest[testtest[foofoo]]]
@@ -34,9 +34,9 @@ fun foo() {
testtest[testtest[foofoo]],
]
testtest[foofoo, testtest[testtest[foofoo]], testsa]
testtest[foofoo, testtest[testtest[foofoo, ]], testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], testsa]
testtest[foofoo, seee, testtest[testtest[foofoo, ]], testsa]
useCallable["A", Callable { println["Hello world"] }]
@@ -48,7 +48,7 @@ fun foo() {
useCallable[Callable { println["Hello world"] }]
useCallable[Callable { println["Hello world"] }]
useCallable[Callable { println["Hello world"] }, ]
useCallable[
Callable {
@@ -76,7 +76,7 @@ fun foo() {
useCallable[{ println["Hello world"] }]
useCallable[{ println["Hello world"] }]
useCallable[{ println["Hello world"] }, ]
useCallable[
{ println["Hello world"] },
@@ -104,7 +104,7 @@ fun foo() {
override fun call() {
println["Hello world"]
}
}, foo[0]]
}, foo[0, ]]
useCallable[object : Callable<Unit> {
override fun call() {
@@ -112,13 +112,11 @@ fun foo() {
}
}]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}, ]
useCallable[object : Callable<Unit> {
override fun call() {
@@ -173,7 +171,7 @@ fun foo() {
foofoo
]
testtest[foofoo/**/]
testtest[foofoo,/**/]
testtest[foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar
@@ -186,7 +184,7 @@ fun foo() {
foofoo
]
testtest[foofoo/**/]
testtest[foofoo,/**/]
testtest[
foofoo, fososos,/*
@@ -194,16 +192,16 @@ fun foo() {
testtest[testtest[foofoo]],
]
testtest[foofoo, testtest[testtest[foofoo]], /**/testsa]
testtest[foofoo, testtest[testtest[foofoo, ]], /**/testsa]
testtest[foofoo, testtest[testtest[foofoo]]/* */, /**/testsa]
testtest[foofoo, testtest[testtest[foofoo, ]]/* */, /**/testsa]
testtest[foofoo, testtest[testtest[foofoo]]/*
testtest[foofoo, testtest[testtest[foofoo, ]]/*
*/, testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], /**/testsa]
testtest[foofoo, seee, testtest[testtest[foofoo, ]], /**/testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], /*
testtest[foofoo, seee, testtest[testtest[foofoo, ]], /*
*/testsa]
useCallable["B", "C", Callable {
@@ -1,37 +1,31 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() {
testtest[foofoo, foofoo, foofoo,
foofoo, bar]
testtest[
foofoo, foofoo, foofoo,
foofoo, bar,
foofoo, foofoo, foofoo, foofoo, bar
]
testtest[foofoo, foofoo, foofoo, foofoo, bar
]
testtest[foofoo, foofoo, foofoo, foofoo,
bar
]
testtest[foofoo
]
testtest[
foofoo, foofoo, foofoo, foofoo, bar,
]
foofoo]
testtest[
foofoo, foofoo, foofoo, foofoo, bar,
foofoo
]
testtest[
foofoo, foofoo, foofoo, foofoo,
bar,
]
testtest[
foofoo,
]
testtest[
foofoo,
]
testtest[
foofoo,
]
testtest[foofoo]
testtest[foofoo, ]
testtest[foofoo, testtest[testtest[foofoo]]]
@@ -40,25 +34,21 @@ fun foo() {
testtest[testtest[foofoo]],
]
testtest[foofoo, testtest[testtest[foofoo]], testsa]
testtest[foofoo, testtest[testtest[foofoo, ]], testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], testsa]
testtest[foofoo, seee, testtest[testtest[foofoo, ]], testsa]
useCallable["A", Callable { println["Hello world"] }]
useCallable[
"B", "C",
Callable {
println["Hello world"]
},
Callable {
println["Hello world"]
},
]
useCallable["B", "C", Callable {
println["Hello world"]
}, Callable {
println["Hello world"]
}]
useCallable[Callable { println["Hello world"] }]
useCallable[Callable { println["Hello world"] }]
useCallable[Callable { println["Hello world"] }, ]
useCallable[
Callable {
@@ -66,8 +56,7 @@ fun foo() {
},
]
useCallable[
Callable { println["Hello world"] },
useCallable[Callable { println["Hello world"] }
]
useCallable[Callable { println["Hello world"] }]{
@@ -75,96 +64,72 @@ fun foo() {
}
useCallable[
Callable { println["Hello world"] },
]
Callable { println["Hello world"] }]
useCallable["A", { println["Hello world"] }]
useCallable[
"B", "C",
{
println["Hello world"]
},
{
println["Hello world"]
},
]
useCallable["B", "C", {
println["Hello world"]
}, {
println["Hello world"]
}]
useCallable[{ println["Hello world"] }]
useCallable[{ println["Hello world"] }]
useCallable[{ println["Hello world"] }, ]
useCallable[
{ println["Hello world"] },
]
useCallable[
{ println["Hello world"] },
useCallable[{ println["Hello world"] }
]
useCallable[
{ println["Hello world"] },
{ println["Hello world"] }]
useCallable["A", object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
useCallable["A", object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
useCallable["B", "C", object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}, foo[0, ]]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}, ]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}
]
useCallable[
"A",
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
"A",
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
"B", "C",
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
foo[0],
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
] {
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}] {
}
@@ -173,70 +138,53 @@ fun foo() {
override fun call() {
println["Hello world"]
}
},
]
}]
testtest[
foofoo, foofoo, foofoo, foofoo,
bar, /*
*/ /* */
foo,
bar /*
*/, /* */ foo
]
testtest[
/*
*/
foofoo, foofoo, foofoo, /*
testtest[/*
*/foofoo, foofoo, foofoo, /*
*/
foofoo, bar,
foofoo, bar]
testtest[foofoo, foofoo, foofoo, foofoo, bar/*
*/]
testtest[foofoo, foofoo, foofoo, foofoo, bar // awdawda
]
testtest[
foofoo, foofoo, foofoo, foofoo,
bar,/*
*/
]
testtest[
foofoo, foofoo, foofoo, foofoo, bar, // awdawda
]
testtest[
foofoo, foofoo, foofoo, foofoo, /*
testtest[foofoo, foofoo, foofoo, foofoo, /*
*/
bar,
bar
]
testtest[
foofoo, // fd
testtest[foofoo // fd
]
testtest[
/**/
foofoo,
testtest[ /**/
foofoo
]
testtest[foofoo/**/]
testtest[foofoo,/**/]
testtest[
foofoo, foofoo, foofoo,
foofoo,/*
*/ /* */
bar,
testtest[foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar
]
testtest[
foofoo, // fd
testtest[foofoo // fd
]
testtest[
/**/
foofoo,
testtest[ /**/
foofoo
]
testtest[foofoo/**/]
testtest[foofoo,/**/]
testtest[
foofoo, fososos,/*
@@ -244,36 +192,24 @@ fun foo() {
testtest[testtest[foofoo]],
]
testtest[foofoo, testtest[testtest[foofoo]], /**/testsa]
testtest[foofoo, testtest[testtest[foofoo, ]], /**/testsa]
testtest[foofoo, testtest[testtest[foofoo]]/* */, /**/testsa]
testtest[foofoo, testtest[testtest[foofoo, ]]/* */, /**/testsa]
testtest[
foofoo,
testtest[testtest[foofoo]],/*
*/
testsa,
]
testtest[foofoo, testtest[testtest[foofoo, ]]/*
*/, testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], /**/testsa]
testtest[foofoo, seee, testtest[testtest[foofoo, ]], /**/testsa]
testtest[
foofoo, seee, testtest[testtest[foofoo]], /*
*/
testsa,
]
testtest[foofoo, seee, testtest[testtest[foofoo, ]], /*
*/testsa]
useCallable[
"B", "C",
Callable {
println["Hello world"]
}, /* */
Callable {
println["Hello world"]
},
]
useCallable["B", "C", Callable {
println["Hello world"]
}, /* */ Callable {
println["Hello world"]
}]
useCallable[
Callable { println["Hello world"] }, // ffd
useCallable[Callable { println["Hello world"] } // ffd
]
}
@@ -0,0 +1,217 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() {
testtest[foofoo, foofoo, foofoo,
foofoo, bar]
testtest[
foofoo, foofoo, foofoo, foofoo, bar
]
testtest[foofoo, foofoo, foofoo, foofoo, bar
]
testtest[foofoo, foofoo, foofoo, foofoo,
bar
]
testtest[foofoo
]
testtest[
foofoo]
testtest[
foofoo
]
testtest[foofoo]
testtest[foofoo, testtest[testtest[foofoo]]]
testtest[
foofoo, fososos,
testtest[testtest[foofoo]],
]
testtest[foofoo, testtest[testtest[foofoo]], testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], testsa]
useCallable["A", Callable { println["Hello world"] }]
useCallable["B", "C", Callable {
println["Hello world"]
}, Callable {
println["Hello world"]
}]
useCallable[Callable { println["Hello world"] }]
useCallable[Callable { println["Hello world"] }]
useCallable[
Callable {
println["Hello world"]
},
]
useCallable[Callable { println["Hello world"] }
]
useCallable[Callable { println["Hello world"] }]{
}
useCallable[
Callable { println["Hello world"] }]
useCallable["A", { println["Hello world"] }]
useCallable["B", "C", {
println["Hello world"]
}, {
println["Hello world"]
}]
useCallable[{ println["Hello world"] }]
useCallable[{ println["Hello world"] }]
useCallable[
{ println["Hello world"] },
]
useCallable[{ println["Hello world"] }
]
useCallable[
{ println["Hello world"] }]
useCallable["A", object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
useCallable["A", object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
useCallable["B", "C", object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}, foo[0]]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}
]
useCallable[object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}] {
}
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
}]
testtest[
foofoo, foofoo, foofoo, foofoo,
bar /*
*/, /* */ foo
]
testtest[/*
*/foofoo, foofoo, foofoo, /*
*/
foofoo, bar]
testtest[foofoo, foofoo, foofoo, foofoo, bar/*
*/]
testtest[foofoo, foofoo, foofoo, foofoo, bar // awdawda
]
testtest[foofoo, foofoo, foofoo, foofoo, /*
*/
bar
]
testtest[foofoo // fd
]
testtest[ /**/
foofoo
]
testtest[foofoo/**/]
testtest[foofoo, foofoo, foofoo, foofoo/*
*/, /* */ bar
]
testtest[foofoo // fd
]
testtest[ /**/
foofoo
]
testtest[foofoo/**/]
testtest[
foofoo, fososos,/*
*/
testtest[testtest[foofoo]],
]
testtest[foofoo, testtest[testtest[foofoo]], /**/testsa]
testtest[foofoo, testtest[testtest[foofoo]]/* */, /**/testsa]
testtest[foofoo, testtest[testtest[foofoo]]/*
*/, testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], /**/testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], /*
*/testsa]
useCallable["B", "C", Callable {
println["Hello world"]
}, /* */ Callable {
println["Hello world"]
}]
useCallable[Callable { println["Hello world"] } // ffd
]
}
@@ -0,0 +1,279 @@
// SET_TRUE: ALLOW_TRAILING_COMMA
fun foo() {
testtest[
foofoo, foofoo, foofoo,
foofoo, bar,
]
testtest[
foofoo, foofoo, foofoo, foofoo, bar,
]
testtest[
foofoo, foofoo, foofoo, foofoo, bar,
]
testtest[
foofoo, foofoo, foofoo, foofoo,
bar,
]
testtest[
foofoo,
]
testtest[
foofoo,
]
testtest[
foofoo,
]
testtest[foofoo]
testtest[foofoo, testtest[testtest[foofoo]]]
testtest[
foofoo, fososos,
testtest[testtest[foofoo]],
]
testtest[foofoo, testtest[testtest[foofoo]], testsa]
testtest[foofoo, seee, testtest[testtest[foofoo]], testsa]
useCallable["A", Callable { println["Hello world"] }]
useCallable[
"B", "C",
Callable {
println["Hello world"]
},
Callable {
println["Hello world"]
},
]
useCallable[Callable { println["Hello world"] }]
useCallable[Callable { println["Hello world"] }]
useCallable[
Callable {
println["Hello world"]
},
]
useCallable[
Callable { println["Hello world"] },
]
useCallable[Callable { println["Hello world"] }]{
}
useCallable[
Callable { println["Hello world"] },
]
useCallable["A", { println["Hello world"] }]
useCallable[
"B", "C",
{
println["Hello world"]
},
{
println["Hello world"]
},
]
useCallable[{ println["Hello world"] }]
useCallable[{ println["Hello world"] }]
useCallable[
{ println["Hello world"] },
]
useCallable[
{ println["Hello world"] },
]
useCallable[
{ println["Hello world"] },
]
useCallable[
"A",
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
"A",
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
"B", "C",
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
foo[0],
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
] {
}
useCallable[
object : Callable<Unit> {
override fun call() {
println["Hello world"]
}
},
]
testtest[
foofoo, foofoo, foofoo, foofoo,
bar, /*
*/ /* */
foo,
]
testtest[
/*
*/
foofoo, foofoo, foofoo, /*
*/
foofoo, bar,
]
testtest[
foofoo, foofoo, foofoo, foofoo,
bar,/*
*/
]
testtest[
foofoo, foofoo, foofoo, foofoo, bar, // awdawda
]
testtest[
foofoo, foofoo, foofoo, foofoo, /*
*/
bar,
]
testtest[
foofoo, // fd
]
testtest[
/**/
foofoo,
]
testtest[foofoo/**/]
testtest[
foofoo, foofoo, foofoo,
foofoo,/*
*/ /* */
bar,
]
testtest[
foofoo, // fd
]
testtest[
/**/
foofoo,
]
testtest[foofoo/**/]
testtest[
foofoo, fososos,/*
*/
testtest[testtest[foofoo]],
]
testtest[foofoo, testtest[testtest[foofoo]], /**/testsa]
testtest[foofoo, testtest[testtest[foofoo]]/* */, /**/testsa]
testtest[
foofoo,
testtest[testtest[foofoo]],/*
*/
testsa,
]
testtest[foofoo, seee, testtest[testtest[foofoo]], /**/testsa]
testtest[
foofoo, seee, testtest[testtest[foofoo]], /*
*/
testsa,
]
useCallable[
"B", "C",
Callable {
println["Hello world"]
}, /* */
Callable {
println["Hello world"]
},
]
useCallable[
Callable { println["Hello world"] }, // ffd
]
}