Do not force new line in body for empty functions and function expressions (KT-10828)

#KT-10828 Fixed
This commit is contained in:
Nikolay Krasko
2016-12-06 16:39:17 +03:00
committed by Nikolay Krasko
parent 268d55104c
commit 2841931ffa
130 changed files with 334 additions and 575 deletions
+22 -15
View File
@@ -1,17 +1,13 @@
val a = fun() {
}
val b = fun test() {
}
val a = fun() {}
val b = fun test() {}
val c = fun() {
}
val c = fun() {}
val c = fun() = 4
val c = fun() =
4
val c = fun() {
}
val c = fun() {}
val c = fun() = 4
fun test() = fun test() = 4
@@ -19,18 +15,29 @@ fun test() = fun test() = 4
fun test() {
test(fun() {
})
test(fun test() {
})
test(fun test() {})
test(fun test() = 5)
test(fun test() = fun test(a: Int) = 2)
2.(fun test() {
})()
2.(fun test() {})()
(fun() = 4)
(fun() {
})
(fun() {})
test(fun test() = 4)
}
}
fun d = fun(a: Int,
b: String) {
}
fun e = fun() {
val a = 1
}
fun f = fun() { foo() }
val g: (String) -> Int = fun(p: String): Unit { /* comment */ /* other comment */ }
fun foo() {}