Deprecate PropertyMetadata, use KProperty<*> for delegated properties instead
This commit is contained in:
+4
-2
@@ -1,7 +1,9 @@
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
annotation class Ann
|
||||
|
||||
class CustomDelegate {
|
||||
operator fun getValue(thisRef: Any?, prop: PropertyMetadata): String = prop.name
|
||||
operator fun getValue(thisRef: Any?, prop: KProperty<*>): String = prop.name
|
||||
}
|
||||
|
||||
<!INAPPLICABLE_TARGET_ON_PROPERTY, WRONG_ANNOTATION_TARGET_WITH_USE_SITE_TARGET!>@get:Ann<!>
|
||||
@@ -34,4 +36,4 @@ class SomeClass {
|
||||
val <!UNUSED_VARIABLE!>localVariable<!> = 5
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user