KT-2242 formatting problems: function literal passed outside the parentheses
#KT-2242 Fixed
This commit is contained in:
@@ -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 }
|
||||
}
|
||||
Reference in New Issue
Block a user