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
+2 -2
View File
@@ -6,9 +6,9 @@ class A {
fun arrayA(): Array<A> = null!!
fun foo(a: A, <warning>c</warning>: Int) {
val (<warning descr="[NAME_SHADOWING] Name shadowed: a"><warning descr="[UNUSED_VARIABLE] Variable 'a' is never used">a</warning></warning>, <warning>b</warning>) = a
val (<warning descr="[NAME_SHADOWING] Name shadowed: a">a</warning>, <warning>b</warning>) = a
val arr = arrayA()
for ((<warning descr="[NAME_SHADOWING] Name shadowed: c">c</warning>, d) in arr) {
for ((<warning descr="[NAME_SHADOWING] Name shadowed: c">c</warning>, <warning>d</warning>) in arr) {
}
}
@@ -1,3 +1,3 @@
fun main() {
for ((i, j)<error>)</error> {}
for ((i, <warning>j</warning>)<error>)</error> {}
}