Use "unnecessary variable" inspection in J2K

Unused variables are no more treated as unnecessary
Related to KT-15958
This commit is contained in:
Mikhail Glukhikh
2017-07-18 16:37:07 +03:00
parent 39f1ef390e
commit 44790eccaf
12 changed files with 91 additions and 58 deletions
@@ -1,9 +1,8 @@
internal class C {
fun foo(o: Any) {
if (o is String) {
val s = o
val l = s.length
val substring = s.substring(l - 2)
val l = o.length
val substring = o.substring(l - 2)
}
}
}