Replace get() and set() to getValue() and setValue() (property delegates)
This commit is contained in:
@@ -18,11 +18,11 @@ class A {
|
||||
}
|
||||
|
||||
class MyDelegate {
|
||||
fun get(t: Any?, p: PropertyMetadata): Int = 1
|
||||
fun getValue(t: Any?, p: PropertyMetadata): Int = 1
|
||||
}
|
||||
|
||||
class MyDelegateThrowsException {
|
||||
fun get(t: Any?, p: PropertyMetadata): Int = throw IllegalStateException()
|
||||
fun getValue(t: Any?, p: PropertyMetadata): Int = throw IllegalStateException()
|
||||
}
|
||||
|
||||
// PRINT_FRAME
|
||||
|
||||
@@ -17,7 +17,7 @@ class A {
|
||||
}
|
||||
|
||||
class MyDelegate {
|
||||
fun get(t: Any?, p: PropertyMetadata): Int = 1
|
||||
fun getValue(t: Any?, p: PropertyMetadata): Int = 1
|
||||
}
|
||||
|
||||
// RENDER_DELEGATED_PROPERTIES: false
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ val Int.testExtVal: Int get() = 1
|
||||
val testDelVal by Delegate()
|
||||
|
||||
class Delegate {
|
||||
fun get(a: Any?, b: PropertyMetadata) = 1
|
||||
fun getValue(a: Any?, b: PropertyMetadata) = 1
|
||||
}
|
||||
|
||||
// EXPRESSION: TestClass().testFun()
|
||||
|
||||
Vendored
+2
-2
@@ -14,11 +14,11 @@ class A {
|
||||
}
|
||||
|
||||
class MyDelegate {
|
||||
fun get(t: Any?, p: PropertyMetadata): Int = 1
|
||||
fun getValue(t: Any?, p: PropertyMetadata): Int = 1
|
||||
}
|
||||
|
||||
class MyDelegateThrowsException {
|
||||
fun get(t: Any?, p: PropertyMetadata): Int = throw IllegalStateException()
|
||||
fun getValue(t: Any?, p: PropertyMetadata): Int = throw IllegalStateException()
|
||||
}
|
||||
|
||||
// PRINT_FRAME
|
||||
+1
-1
@@ -13,7 +13,7 @@ class A {
|
||||
}
|
||||
|
||||
class MyDelegate {
|
||||
fun get(t: Any?, p: PropertyMetadata): Int = 1
|
||||
fun getValue(t: Any?, p: PropertyMetadata): Int = 1
|
||||
}
|
||||
|
||||
// RENDER_DELEGATED_PROPERTIES: false
|
||||
|
||||
Reference in New Issue
Block a user