"Redundant Unit" inspection: new tests, simplification & fixes

Related to KT-23977 and KT-24066
This commit is contained in:
Mikhail Glukhikh
2018-05-03 16:10:04 +03:00
parent 6e150d27f1
commit e07f83ddbc
4 changed files with 37 additions and 12 deletions
@@ -0,0 +1,9 @@
// PROBLEM: none
fun foo(f: (Unit, Int, String) -> Any) {}
fun test() {
foo { _, _, _ ->
return@foo Unit<caret>
}
}
@@ -0,0 +1,5 @@
// PROBLEM: none
fun f(): Any? {
return Unit<caret>
}