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,4 +1,6 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty
var a: Int by A()
var a1 by <!DELEGATE_SPECIAL_FUNCTION_MISSING, DELEGATE_SPECIAL_FUNCTION_MISSING!>A()<!>
@@ -8,16 +10,16 @@ val cObj = C()
var c: String by cObj
class A {
operator fun <T> getValue(t: Any?, p: PropertyMetadata): T = null!!
operator fun <T> setValue(t: Any?, p: PropertyMetadata, x: T) = Unit
operator fun <T> getValue(t: Any?, p: KProperty<*>): T = null!!
operator fun <T> setValue(t: Any?, p: KProperty<*>, x: T) = Unit
}
class B
operator fun <T> B.getValue(t: Any?, p: PropertyMetadata): T = null!!
operator fun <T> B.setValue(t: Any?, p: PropertyMetadata, x: T) = Unit
operator fun <T> B.getValue(t: Any?, p: KProperty<*>): T = null!!
operator fun <T> B.setValue(t: Any?, p: KProperty<*>, x: T) = Unit
class C
operator inline fun <reified T> C.getValue(t: Any?, p: PropertyMetadata): T = null!!
operator inline fun <reified T> C.setValue(t: Any?, p: PropertyMetadata, x: T) = Unit
operator inline fun <reified T> C.getValue(t: Any?, p: KProperty<*>): T = null!!
operator inline fun <reified T> C.setValue(t: Any?, p: KProperty<*>, x: T) = Unit