Implement inspection for redundant lambda arrow

Fixes #KT-11991
This commit is contained in:
Kirill Rakhman
2017-07-22 17:10:19 +02:00
committed by Dmitry Jemerov
parent 9ac1a0140c
commit 41e5840298
8 changed files with 108 additions and 0 deletions
@@ -0,0 +1 @@
org.jetbrains.kotlin.idea.inspections.RedundantLambdaArrowInspection
@@ -0,0 +1,7 @@
// PROBLEM: none
fun foo(f: (Int) -> Unit) {}
fun bar() {
foo { i <caret>-> }
}
@@ -0,0 +1,5 @@
fun foo(f: () -> Unit) {}
fun bar() {
foo { <caret>-> }
}
@@ -0,0 +1,5 @@
fun foo(f: () -> Unit) {}
fun bar() {
foo { <caret>}
}