Deprecate PropertyMetadata, use KProperty<*> for delegated properties instead
This commit is contained in:
Vendored
+4
-2
@@ -1,9 +1,11 @@
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class A3 {
|
||||
val a: String by l@ MyProperty()
|
||||
|
||||
class MyProperty<T> {}
|
||||
|
||||
operator fun <T> MyProperty<T>.getValue(thisRef: Any?, desc: PropertyMetadata): T {
|
||||
operator fun <T> MyProperty<T>.getValue(thisRef: Any?, desc: KProperty<*>): T {
|
||||
throw Exception("$thisRef $desc")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user