Update compiler tests to use KProperty instead of PropertyMetadata

This commit is contained in:
Alexander Udalov
2015-10-13 14:02:29 +03:00
parent a6846b3967
commit 51bf68ce27
68 changed files with 265 additions and 139 deletions
@@ -1,9 +1,11 @@
package test
import kotlin.reflect.KProperty
annotation class Anno
class Class {
@Anno val x: Int by object {
fun getValue(thiz: Class, data: PropertyMetadata) = null!!
fun getValue(thiz: Class, data: KProperty<*>) = null!!
}
}
@@ -1,7 +1,9 @@
package test
import kotlin.reflect.KProperty
annotation class Anno
@Anno val x: Int by object {
fun getValue(thiz: Any?, data: PropertyMetadata) = null!!
fun getValue(thiz: Any?, data: KProperty<*>) = null!!
}
@@ -1,11 +1,13 @@
//ALLOW_AST_ACCESS
package test
import kotlin.reflect.KProperty
class A {
var a by MyProperty()
}
class MyProperty<T> {
fun getValue(t: T, p: PropertyMetadata): Int = 42
fun setValue(t: T, p: PropertyMetadata, i: Int) {}
}
fun getValue(t: T, p: KProperty<*>): Int = 42
fun setValue(t: T, p: KProperty<*>, i: Int) {}
}
@@ -9,6 +9,6 @@ public final class A {
public final class MyProperty</*0*/ T> {
/*primary*/ public constructor MyProperty</*0*/ T>()
public final fun getValue(/*0*/ t: T, /*1*/ p: kotlin.PropertyMetadata): kotlin.Int
public final fun setValue(/*0*/ t: T, /*1*/ p: kotlin.PropertyMetadata, /*2*/ i: kotlin.Int): kotlin.Unit
public final fun getValue(/*0*/ t: T, /*1*/ p: kotlin.reflect.KProperty<*>): kotlin.Int
public final fun setValue(/*0*/ t: T, /*1*/ p: kotlin.reflect.KProperty<*>, /*2*/ i: kotlin.Int): kotlin.Unit
}