UNUSED_VARIABLE is now reported only for last entry of destructuring declaration (if applicable) #KT-14221 Fixed

This commit is contained in:
Mikhail Glukhikh
2016-10-07 20:38:00 +03:00
parent 126304c197
commit 8d48b0d2a0
24 changed files with 65 additions and 31 deletions
@@ -7,7 +7,7 @@ class C {
}
fun test1(c: C) {
val (<!UNUSED_VARIABLE!>a<!>, <!UNUSED_VARIABLE!>b<!>) = c
val (a, <!UNUSED_VARIABLE!>b<!>) = c
}
fun test2(c: C) {
@@ -16,7 +16,7 @@ fun test2(c: C) {
}
fun test3(c: C) {
var (<!ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE!>a<!>, <!UNUSED_VARIABLE!>b<!>) = c
var (a, <!UNUSED_VARIABLE!>b<!>) = c
<!UNUSED_VALUE!>a =<!> 3
}