KT-2242 formatting problems: function literal passed outside the parentheses - option for spaces in single line function literal
#KT-2242 Fixed
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
fun test(some: (Int) -> Int) {
|
||||
}
|
||||
|
||||
fun foo() = test() {a -> if (true) { a } else { 1 }}
|
||||
fun foo() = test() {a -> if (true) { a } else { 1 }}
|
||||
|
||||
// SET_TRUE: INSERT_WHITESPACES_IN_SIMPLE_ONE_LINE_METHOD
|
||||
@@ -7,4 +7,6 @@ fun foo() = test() { a ->
|
||||
} else {
|
||||
1
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// SET_TRUE: INSERT_WHITESPACES_IN_SIMPLE_ONE_LINE_METHOD
|
||||
@@ -0,0 +1,12 @@
|
||||
fun test(some: (Int) -> Int) {
|
||||
}
|
||||
|
||||
fun foo() = test() {a ->
|
||||
if (true) {
|
||||
a
|
||||
} else {
|
||||
1
|
||||
}
|
||||
}
|
||||
|
||||
// SET_TRUE: INSERT_WHITESPACES_IN_SIMPLE_ONE_LINE_METHOD
|
||||
@@ -1,4 +1,6 @@
|
||||
fun test(some: (Int) -> Int) {
|
||||
}
|
||||
|
||||
fun foo() = test() { it }
|
||||
fun foo() = test() { it }
|
||||
|
||||
// SET_TRUE: INSERT_WHITESPACES_IN_SIMPLE_ONE_LINE_METHOD
|
||||
@@ -1,4 +1,6 @@
|
||||
fun test(some: (Int) -> Int) {
|
||||
}
|
||||
|
||||
fun foo() = test() { it }
|
||||
fun foo() = test() { it }
|
||||
|
||||
// SET_TRUE: INSERT_WHITESPACES_IN_SIMPLE_ONE_LINE_METHOD
|
||||
@@ -0,0 +1,6 @@
|
||||
fun test(some: (Int) -> Int) {
|
||||
}
|
||||
|
||||
fun foo() = test() {it}
|
||||
|
||||
// SET_TRUE: INSERT_WHITESPACES_IN_SIMPLE_ONE_LINE_METHOD
|
||||
Reference in New Issue
Block a user