Change formatting of function expressions without names

No spaces between 'fun' and value parameter list
This commit is contained in:
Denis Zharkov
2015-05-19 11:17:06 +03:00
parent 2deb7faf05
commit b650753643
8 changed files with 19 additions and 13 deletions
@@ -1,4 +1,4 @@
val a = fun () {
val a = fun() {
}
val b = fun test() {
}
@@ -17,6 +17,8 @@ val c = fun() = 4
fun test() = fun test() = 4
fun test() {
test(fun() {
})
test(fun test() {
})
test(fun test() = 5)
@@ -1,18 +1,21 @@
val a = fun () {}
val b = fun test() {}
val c=fun(){}
val c=fun()=4
val c=fun (){}
val c=fun ()=4
val c=fun()=
val c=fun ()=
4
val c = fun() {}
val c = fun() = 4
val c = fun () = 4
fun test() = fun test() = 4
fun test() {
test(fun
() {
})
test(fun test() {})
test(fun test() = 5)
@@ -6,5 +6,5 @@ fun foo(a: Any) {}
val a = foo a@ {
val a = fun (): Int = 1
val a = fun(): Int = 1
}
@@ -3,4 +3,4 @@ val h = { -> }
val l = bar@ fun Int.bar() {
}
val s = (fun (): Int = 5)()
val s = (fun(): Int = 5)()
@@ -1,8 +1,8 @@
// "Migrate lambda syntax in whole project" "true"
val a = fun (): Int {
val a = fun(): Int {
val b = fun (): Int = 5
val b = fun(): Int = 5
return b()
}
@@ -1,7 +1,7 @@
// "Migrate lambda syntax" "true"
val a = fun (p: Int): String {
val a = fun(p: Int): String {
val v = p + 1
return v.toString()
// returns v.toString()