Deprecate PropertyMetadata, use KProperty<*> for delegated properties instead

This commit is contained in:
Alexander Udalov
2015-10-12 21:42:18 +03:00
parent 3c74f48f91
commit ec1b4776fe
145 changed files with 536 additions and 379 deletions
@@ -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!>@field:Ann<!>
@@ -31,4 +33,4 @@ class SomeClass {
}
class WithPrimaryConstructor(@field:Ann val a: String)
class WithPrimaryConstructor(@field:Ann val a: String)