KT-6671 Report unused constructor parameters
#KT-6671 fixed
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
val a: Int by A(1)
|
||||
|
||||
class A<T: Any>(i: T) {
|
||||
class A<T: Any>(<!UNUSED_PARAMETER!>i<!>: T) {
|
||||
fun get(t: Any?, p: PropertyMetadata): T {
|
||||
t.equals(p) // to avoid UNUSED_PARAMETER warning
|
||||
throw Exception()
|
||||
|
||||
@@ -5,7 +5,7 @@ val b by Delegate(<!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!>b<!>)
|
||||
val c by <!DEBUG_INFO_ELEMENT_WITH_ERROR_TYPE!>d<!>
|
||||
val d by <!TYPECHECKER_HAS_RUN_INTO_RECURSIVE_PROBLEM!>c<!>
|
||||
|
||||
class Delegate(i: Int) {
|
||||
class Delegate(<!UNUSED_PARAMETER!>i<!>: Int) {
|
||||
fun get(t: Any?, p: PropertyMetadata): Int {
|
||||
t.equals(p) // to avoid UNUSED_PARAMETER warning
|
||||
return 1
|
||||
|
||||
@@ -4,7 +4,7 @@ class A {
|
||||
val Int.a by Delegate(<!TYPE_MISMATCH!>this<!>)
|
||||
}
|
||||
|
||||
class Delegate(i: Int) {
|
||||
class Delegate(<!UNUSED_PARAMETER!>i<!>: Int) {
|
||||
fun get(t: Any?, p: PropertyMetadata): Int {
|
||||
t.equals(p) // to avoid UNUSED_PARAMETER warning
|
||||
return 1
|
||||
|
||||
Reference in New Issue
Block a user