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,24 +1,26 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty
class A<R>() {
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
}
var a1: Int by <!TYPE_INFERENCE_NO_INFORMATION_FOR_PARAMETER!>A<!>()
var a2: Int by A<String>()
class B<R>() {
operator fun <T> getValue(t: Any?, p: PropertyMetadata): T = null!!
operator fun setValue(t: Any?, p: PropertyMetadata, x: R) = Unit
operator fun <T> getValue(t: Any?, p: KProperty<*>): T = null!!
operator fun setValue(t: Any?, p: KProperty<*>, x: R) = Unit
}
var b1: Int by B()
var b2: Int by B<Number>()
class C<R>() {
operator fun getValue(t: Any?, p: PropertyMetadata): R = null!!
operator fun <T> setValue(t: Any?, p: PropertyMetadata, x: T) = Unit
operator fun getValue(t: Any?, p: KProperty<*>): R = null!!
operator fun <T> setValue(t: Any?, p: KProperty<*>, x: T) = Unit
}
var c1: Int by C()