Convert Function Type Parameter to Receiver: Drop redundant arrows
This commit is contained in:
+5
@@ -0,0 +1,5 @@
|
||||
fun foo(n: Int, action: (<caret>Int) -> Int) = action(n)
|
||||
|
||||
fun test() {
|
||||
foo(1) { n -> n + 1 }
|
||||
}
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
fun foo(n: Int, action: Int.(<caret>) -> Int) = n.action()
|
||||
|
||||
fun test() {
|
||||
foo(1) { this + 1 }
|
||||
}
|
||||
Reference in New Issue
Block a user