Deprecate PropertyMetadata, use KProperty<*> for delegated properties instead
This commit is contained in:
+5
-3
@@ -1,5 +1,7 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class A {
|
||||
var a: Int by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>Delegate()<!>
|
||||
}
|
||||
@@ -7,9 +9,9 @@ class A {
|
||||
var aTopLevel: Int by <!DELEGATE_SPECIAL_FUNCTION_NONE_APPLICABLE!>Delegate()<!>
|
||||
|
||||
class Delegate {
|
||||
operator fun getValue(t: Any?, p: PropertyMetadata): Int {
|
||||
operator fun getValue(t: Any?, p: KProperty<*>): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
operator fun setValue(t: Any?, p: PropertyMetadata, a: Int, c: Int) {}
|
||||
}
|
||||
operator fun setValue(t: Any?, p: KProperty<*>, a: Int, c: Int) {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user