KT-2242 formatting problems: function literal passed outside the parentheses

#KT-2242 Fixed
This commit is contained in:
Nikolay Krasko
2012-08-21 12:52:42 +04:00
parent d38b965bf1
commit 2e92594462
13 changed files with 123 additions and 10 deletions
@@ -0,0 +1,9 @@
fun test(some: (Int) -> Int) {
}
fun foo() {
test() {
// Some comment
it
}
}
@@ -0,0 +1,9 @@
fun test(some: (Int) -> Int) {
}
fun foo() {
test() {
// Some comment
it
}
}
@@ -0,0 +1,4 @@
fun test(some: (Int) -> Int) {
}
fun foo() = test() {if (true) { 0 } else { 1 }}
@@ -0,0 +1,4 @@
fun test(some: (Int) -> Int) {
}
fun foo() = test() {a -> if (true) { a } else { 1 }}
@@ -0,0 +1,10 @@
fun test(some: (Int) -> Int) {
}
fun foo() = test() { a ->
if (true) {
a
} else {
1
}
}
@@ -0,0 +1,10 @@
fun test(some: (Int) -> Int) {
}
fun foo() = test() {
if (true) {
0
} else {
1
}
}
@@ -0,0 +1,4 @@
fun test(some: (Int) -> Int) {
}
fun foo() = test() { it }
@@ -0,0 +1,4 @@
fun test(some: (Int) -> Int) {
}
fun foo() = test() { it }
@@ -0,0 +1,6 @@
fun test(some : (Int) -> Int) {
}
fun foo() {
test() { it }
}
@@ -0,0 +1,6 @@
fun test(some: (Int) -> Int) {
}
fun foo() {
test() { it }
}