Convert Function Type Parameter to Receiver: Drop redundant arrows

This commit is contained in:
Alexey Sedunov
2017-08-10 20:13:03 +03:00
parent f80fcc7146
commit 537c1fd063
4 changed files with 21 additions and 1 deletions
@@ -0,0 +1,5 @@
fun foo(n: Int, action: (<caret>Int) -> Int) = action(n)
fun test() {
foo(1) { n -> n + 1 }
}
@@ -0,0 +1,5 @@
fun foo(n: Int, action: Int.(<caret>) -> Int) = n.action()
fun test() {
foo(1) { this + 1 }
}