Formatter: support trailing comma in value arguments
#KT-34744
This commit is contained in:
@@ -41,10 +41,12 @@ val x8 = foo!!!!!!!!
|
||||
val x9 = ((b!!)!!!!)!!
|
||||
.f
|
||||
|
||||
val y = xyzzy(foo
|
||||
.bar()
|
||||
.baz()
|
||||
.quux())
|
||||
val y = xyzzy(
|
||||
foo
|
||||
.bar()
|
||||
.baz()
|
||||
.quux(),
|
||||
)
|
||||
|
||||
fun foo() {
|
||||
foo
|
||||
|
||||
@@ -30,9 +30,11 @@ val x8 = foo!!!!!!!!.bar()
|
||||
|
||||
val x9 = ((b!!)!!!!)!!.f
|
||||
|
||||
val y = xyzzy(foo.bar()
|
||||
.baz()
|
||||
.quux())
|
||||
val y = xyzzy(
|
||||
foo.bar()
|
||||
.baz()
|
||||
.quux(),
|
||||
)
|
||||
|
||||
fun foo() {
|
||||
foo.bar()
|
||||
|
||||
+11
-7
@@ -12,12 +12,16 @@ fun test() {
|
||||
|
||||
fun test1() {
|
||||
val abc = ArrayList<Int>()
|
||||
.map({
|
||||
it * 2
|
||||
})
|
||||
.filter({
|
||||
it > 4
|
||||
})
|
||||
.map(
|
||||
{
|
||||
it * 2
|
||||
},
|
||||
)
|
||||
.filter(
|
||||
{
|
||||
it > 4
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
@@ -35,7 +39,7 @@ fun test3() {
|
||||
|
||||
fun test4() {
|
||||
val abc = ArrayList<Int>().mapTo(
|
||||
LinkedHashSet()
|
||||
LinkedHashSet(),
|
||||
) {
|
||||
it * 2
|
||||
}
|
||||
|
||||
@@ -12,12 +12,16 @@ fun test() {
|
||||
|
||||
fun test1() {
|
||||
val abc = ArrayList<Int>()
|
||||
.map({
|
||||
it * 2
|
||||
})
|
||||
.filter({
|
||||
it > 4
|
||||
})
|
||||
.map(
|
||||
{
|
||||
it * 2
|
||||
},
|
||||
)
|
||||
.filter(
|
||||
{
|
||||
it > 4
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
@@ -35,7 +39,7 @@ fun test3() {
|
||||
|
||||
fun test4() {
|
||||
val abc = ArrayList<Int>().mapTo(
|
||||
LinkedHashSet()
|
||||
LinkedHashSet(),
|
||||
) {
|
||||
it * 2
|
||||
}
|
||||
|
||||
+7
-5
@@ -6,9 +6,11 @@ fun foo() {
|
||||
finish()
|
||||
}
|
||||
|
||||
FirebaseAuth.getInstance().addAuthStateListener(object : FirebaseAuth.AuthStateListener {
|
||||
override fun onAuthStateChanged(auth: FirebaseAuth) {
|
||||
// ...
|
||||
}
|
||||
})
|
||||
FirebaseAuth.getInstance().addAuthStateListener(
|
||||
object : FirebaseAuth.AuthStateListener {
|
||||
override fun onAuthStateChanged(auth: FirebaseAuth) {
|
||||
// ...
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user