Report UNUSED_EXPRESSION on anonymous functions
This commit is contained in:
Vendored
+8
-8
@@ -1,21 +1,21 @@
|
||||
fun unusedExpressions() {
|
||||
if (1 == 1)
|
||||
fun(): Int {return 1}
|
||||
<!UNUSED_EXPRESSION!>fun(): Int {return 1}<!>
|
||||
else
|
||||
fun() = 1
|
||||
<!UNUSED_EXPRESSION!>fun() = 1<!>
|
||||
|
||||
if (1 == 1) {
|
||||
fun(): Int {
|
||||
<!UNUSED_EXPRESSION!>fun(): Int {
|
||||
return 1
|
||||
}
|
||||
}<!>
|
||||
}
|
||||
else
|
||||
fun() = 1
|
||||
<!UNUSED_EXPRESSION!>fun() = 1<!>
|
||||
|
||||
when (1) {
|
||||
0 -> fun(): Int {return 1}
|
||||
else -> fun() = 1
|
||||
0 -> <!UNUSED_EXPRESSION!>fun(): Int {return 1}<!>
|
||||
else -> <!UNUSED_EXPRESSION!>fun() = 1<!>
|
||||
}
|
||||
|
||||
fun() = 1
|
||||
<!UNUSED_EXPRESSION!>fun() = 1<!>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user