Remove PropertyMetadata from project and bytecode, migrate code to KProperty

This commit is contained in:
Alexander Udalov
2015-11-20 16:37:47 +03:00
parent fb61dc7e81
commit 7b3b157707
22 changed files with 99 additions and 74 deletions
@@ -25,11 +25,11 @@ class CustomDelegate3 {
operator fun set(thisRef: Any?, prop: KProperty<*>, value: String) {}
}
operator fun OkDelegate.get(thisRef: Any?, prop: <!DEPRECATION!>PropertyMetadata<!>): Int = 4
operator fun OkDelegate.set(thisRef: Any?, prop: <!DEPRECATION!>PropertyMetadata<!>, value: Int) {}
operator fun OkDelegate.get(thisRef: Any?, prop: KProperty<*>): Int = 4
operator fun OkDelegate.set(thisRef: Any?, prop: KProperty<*>, value: Int) {}
operator fun CustomDelegate3.getValue(thisRef: Any?, prop: <!DEPRECATION!>PropertyMetadata<!>): Int = 4
operator fun CustomDelegate3.setValue(thisRef: Any?, prop: <!DEPRECATION!>PropertyMetadata<!>, value: Int) {}
operator fun CustomDelegate3.getValue(thisRef: Any?, prop: KProperty<*>): Int = 4
operator fun CustomDelegate3.setValue(thisRef: Any?, prop: KProperty<*>, value: Int) {}
class Example {
@@ -50,4 +50,4 @@ class Example {
fun requireString(s: String) {}
fun requireInt(n: Int) {}
}
}
@@ -1,9 +1,9 @@
package
public operator fun OkDelegate.get(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.PropertyMetadata): kotlin.Int
public operator fun CustomDelegate3.getValue(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.PropertyMetadata): kotlin.Int
public operator fun OkDelegate.set(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.PropertyMetadata, /*2*/ value: kotlin.Int): kotlin.Unit
public operator fun CustomDelegate3.setValue(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.PropertyMetadata, /*2*/ value: kotlin.Int): kotlin.Unit
public operator fun OkDelegate.get(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.reflect.KProperty<*>): kotlin.Int
public operator fun CustomDelegate3.getValue(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.reflect.KProperty<*>): kotlin.Int
public operator fun OkDelegate.set(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.reflect.KProperty<*>, /*2*/ value: kotlin.Int): kotlin.Unit
public operator fun CustomDelegate3.setValue(/*0*/ thisRef: kotlin.Any?, /*1*/ prop: kotlin.reflect.KProperty<*>, /*2*/ value: kotlin.Int): kotlin.Unit
public final class CustomDelegate {
public constructor CustomDelegate()
@@ -1,11 +1,13 @@
// !DIAGNOSTICS: -UNUSED_PARAMETER -DEPRECATION
// !DIAGNOSTICS: -UNUSED_PARAMETER
import kotlin.reflect.KProperty
operator fun Any.getValue(x: Any?, y: Any): Any = null!!
class <!CONFLICTING_JVM_DECLARATIONS!>C<!> {
val x by 1
<!CONFLICTING_JVM_DECLARATIONS!>val `$$delegatedProperties`: Array<PropertyMetadata><!> = null!!
<!CONFLICTING_JVM_DECLARATIONS!>val `$$delegatedProperties`: Array<KProperty<*>><!> = null!!
}
val x by 1
<!CONFLICTING_JVM_DECLARATIONS!>val `$$delegatedProperties`: Array<PropertyMetadata><!> = null!!
<!CONFLICTING_JVM_DECLARATIONS!>val `$$delegatedProperties`: Array<KProperty<*>><!> = null!!
@@ -1,12 +1,12 @@
package
public val `$$delegatedProperties`: kotlin.Array<kotlin.PropertyMetadata>
public val `$$delegatedProperties`: kotlin.Array<kotlin.reflect.KProperty<*>>
public val x: kotlin.Any
public operator fun kotlin.Any.getValue(/*0*/ x: kotlin.Any?, /*1*/ y: kotlin.Any): kotlin.Any
public final class C {
public constructor C()
public final val `$$delegatedProperties`: kotlin.Array<kotlin.PropertyMetadata>
public final val `$$delegatedProperties`: kotlin.Array<kotlin.reflect.KProperty<*>>
public final val x: kotlin.Any
public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean
public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int