Better implementation of "Move lambda outside parenthesis"
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
// ERROR: Unresolved reference: it
|
||||
|
||||
fun foo() {
|
||||
bar <caret>{ it }
|
||||
bar<caret> { it }
|
||||
}
|
||||
|
||||
fun bar(a: Int = 0, f: (Int) -> Int) { }
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
fun foo(p: (Int, () -> Int) -> Unit) {
|
||||
p(1) <caret>{ 2 }
|
||||
p(1<caret>) { 2 }
|
||||
}
|
||||
|
||||
+6
@@ -0,0 +1,6 @@
|
||||
// IS_APPLICABLE: false
|
||||
fun foo() {
|
||||
bar(<caret>{ it }) {it}
|
||||
}
|
||||
|
||||
fun bar(p1: (Int) -> Int, p2: (Int) -> Int) { }
|
||||
@@ -3,7 +3,7 @@ fun bar(a: Int, b: Int, f: () -> Unit) {}
|
||||
fun foo(a: Int, b: Int) = 2
|
||||
|
||||
fun test() {
|
||||
bar(1, 2) {
|
||||
bar(1, 2 /* , , */) {
|
||||
val a = foo(1, 2)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user