Deprecate PropertyMetadata, use KProperty<*> for delegated properties instead
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class A {
|
||||
val c: Int by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>Delegate()<!>
|
||||
}
|
||||
|
||||
class Delegate {
|
||||
fun getValue(t: Int, p: PropertyMetadata): Int {
|
||||
t.equals(p) // to avoid UNUSED_PARAMETER warning
|
||||
fun getValue(t: Int, p: KProperty<*>): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
fun getValue(t: String, p: PropertyMetadata): Int {
|
||||
t.equals(p) // to avoid UNUSED_PARAMETER warning
|
||||
fun getValue(t: String, p: KProperty<*>): Int {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user