Function literal expression outside the parentheses wrapped into JetFunctionLiteralArgument
Extracted JetFunctionLiteralArgument.moveInsideParenthesesAndReplaceWith util function
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
bar(2) <caret>@l{ it * 3 }
|
||||
}
|
||||
|
||||
fun bar(a: Int, b: (Int) -> Int) {
|
||||
b(a)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
bar(2, @l{ it * 3 })
|
||||
}
|
||||
|
||||
fun bar(a: Int, b: (Int) -> Int) {
|
||||
b(a)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
bar <caret>@l{ it * 3 }
|
||||
}
|
||||
|
||||
fun bar(b: (Int) -> Int) {
|
||||
b(42)
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
// IS_APPLICABLE: true
|
||||
fun foo() {
|
||||
bar(@l{ it * 3 })
|
||||
}
|
||||
|
||||
fun bar(b: (Int) -> Int) {
|
||||
b(42)
|
||||
}
|
||||
Reference in New Issue
Block a user