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
@@ -1,3 +1,4 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.properties.Delegates
class My {
@@ -6,4 +7,4 @@ class My {
// Both Ok
@get:JvmSynthetic val t: String by lazy { "t" }
@set:JvmSynthetic var z: String by Delegates.observable("?") { prop, old, new -> old.hashCode() }
}
}
@@ -1,3 +1,4 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.jvm.Volatile
import kotlin.properties.Delegates
@@ -9,4 +10,4 @@ class My {
<!VOLATILE_ON_DELEGATE!>@delegate:Volatile<!> var z: String by Delegates.observable("?") { prop, old, new -> old.hashCode() }
<!VOLATILE_ON_VALUE!>@field:Volatile<!> val w = 2
}
}