Replace get() and set() to getValue() and setValue() (property delegates)

This commit is contained in:
Yan Zhulanow
2015-10-05 20:18:58 +03:00
parent 2fee9d362c
commit 1f2b4e20fe
295 changed files with 718 additions and 511 deletions
@@ -4,6 +4,6 @@ annotation class Anno
class Class {
@Anno val x: Int by object {
fun get(thiz: Class, data: PropertyMetadata) = null!!
fun getValue(thiz: Class, data: PropertyMetadata) = null!!
}
}
@@ -3,5 +3,5 @@ package test
annotation class Anno
@Anno val x: Int by object {
fun get(thiz: Any?, data: PropertyMetadata) = null!!
fun getValue(thiz: Any?, data: PropertyMetadata) = null!!
}
@@ -6,6 +6,6 @@ class A {
}
class MyProperty<T> {
fun get(t: T, p: PropertyMetadata): Int = 42
fun set(t: T, p: PropertyMetadata, i: Int) {}
fun getValue(t: T, p: PropertyMetadata): Int = 42
fun setValue(t: T, p: PropertyMetadata, 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 get(/*0*/ t: T, /*1*/ p: kotlin.PropertyMetadata): kotlin.Int
public final fun set(/*0*/ t: T, /*1*/ p: kotlin.PropertyMetadata, /*2*/ i: kotlin.Int): kotlin.Unit
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
}