Report warning on unused entities that can be renamed to _

Currently it's all about lambda parameters/destructuring entries

 #KT-14347 In Progress
This commit is contained in:
Denis Zharkov
2016-10-13 16:44:27 +03:00
parent a9fcee098d
commit 4c69416f2b
56 changed files with 123 additions and 121 deletions
@@ -7,7 +7,7 @@ class C {
}
fun test1(c: C) {
val (a, <!UNUSED_VARIABLE!>b<!>) = c
val (<!UNUSED_VARIABLE!>a<!>, <!UNUSED_VARIABLE!>b<!>) = c
}
fun test2(c: C) {
@@ -16,7 +16,7 @@ fun test2(c: C) {
}
fun test3(c: C) {
var (a, <!UNUSED_VARIABLE!>b<!>) = c
var (<!ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE!>a<!>, <!UNUSED_VARIABLE!>b<!>) = c
<!UNUSED_VALUE!>a =<!> 3
}
@@ -24,4 +24,4 @@ fun test4(c: C) {
var (<!VARIABLE_WITH_REDUNDANT_INITIALIZER!>a<!>, <!UNUSED_VARIABLE!>b<!>) = c
a = 3
a + 1
}
}