Replace get() and set() to getValue() and setValue() (property delegates)
This commit is contained in:
+1
-1
@@ -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!!
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user