Don't mark parameters of get/set/propertyDelegated functions as unused.
#KT-5974 fixed
This commit is contained in:
+4
-4
@@ -9,11 +9,11 @@ fun getMyProperty1<A, B>() = MyProperty1<A, B>()
|
||||
|
||||
class MyProperty1<T, R> {
|
||||
|
||||
public fun get(<!UNUSED_PARAMETER!>thisRef<!>: R, <!UNUSED_PARAMETER!>desc<!>: PropertyMetadata): T {
|
||||
public fun get(thisRef: R, desc: PropertyMetadata): T {
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
public fun set(<!UNUSED_PARAMETER!>i<!>: Int, <!UNUSED_PARAMETER!>j<!>: Int, <!UNUSED_PARAMETER!>k<!>: Int) {
|
||||
public fun set(i: Int, j: Int, k: Int) {
|
||||
println("set")
|
||||
}
|
||||
}
|
||||
@@ -29,11 +29,11 @@ fun getMyProperty2<A, B>() = MyProperty2<A, B>()
|
||||
|
||||
class MyProperty2<T, R> {
|
||||
|
||||
public fun get(<!UNUSED_PARAMETER!>thisRef<!>: R, <!UNUSED_PARAMETER!>desc<!>: PropertyMetadata): T {
|
||||
public fun get(thisRef: R, desc: PropertyMetadata): T {
|
||||
throw Exception()
|
||||
}
|
||||
|
||||
public fun set(<!UNUSED_PARAMETER!>i<!>: Int) {
|
||||
public fun set(i: Int) {
|
||||
println("set")
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,11 +5,11 @@ class A {
|
||||
var aTopLevel: Int by Delegate()
|
||||
|
||||
class Delegate {
|
||||
fun get(<!UNUSED_PARAMETER!>t<!>: Nothing?, p: PropertyMetadata): Int {
|
||||
fun get(t: Nothing?, p: PropertyMetadata): Int {
|
||||
p.equals(null) // to avoid UNUSED_PARAMETER warning
|
||||
return 1
|
||||
}
|
||||
fun set(<!UNUSED_PARAMETER!>t<!>: Nothing?, p: PropertyMetadata, a: Int) {
|
||||
fun set(t: Nothing?, p: PropertyMetadata, a: Int) {
|
||||
p.equals(a) // to avoid UNUSED_PARAMETER warning
|
||||
}
|
||||
}
|
||||
@@ -5,11 +5,11 @@ class A {
|
||||
var aTopLevel: Int by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE, DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>Delegate()<!>
|
||||
|
||||
class Delegate {
|
||||
fun get(<!UNUSED_PARAMETER!>t<!>: Nothing, p: PropertyMetadata): Int {
|
||||
fun get(t: Nothing, p: PropertyMetadata): Int {
|
||||
p.equals(null) // to avoid UNUSED_PARAMETER warning
|
||||
return 1
|
||||
}
|
||||
fun set(<!UNUSED_PARAMETER!>t<!>: Nothing, p: PropertyMetadata, a: Int) {
|
||||
fun set(t: Nothing, p: PropertyMetadata, a: Int) {
|
||||
p.equals(a) // to avoid UNUSED_PARAMETER warning
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user