Replace get() and set() to getValue() and setValue() (property delegates)
This commit is contained in:
+2
-2
@@ -9,5 +9,5 @@ class B {
|
||||
}
|
||||
|
||||
// MULTIRESOLVE
|
||||
// REF: (for T in dependency).get(R,kotlin.PropertyMetadata)
|
||||
// REF: (for T in dependency).set(R,kotlin.PropertyMetadata,kotlin.Int)
|
||||
// REF: (for T in dependency).getValue(R,kotlin.PropertyMetadata)
|
||||
// REF: (for T in dependency).setValue(R,kotlin.PropertyMetadata,kotlin.Int)
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
package dependency
|
||||
|
||||
public fun <T, R> T.get(thisRef: R, desc: PropertyMetadata): Int {
|
||||
public fun <T, R> T.getValue(thisRef: R, desc: PropertyMetadata): Int {
|
||||
return 3
|
||||
}
|
||||
|
||||
public fun <T, R> T.set(thisRef: R, desc: PropertyMetadata, value: Int) {
|
||||
public fun <T, R> T.setValue(thisRef: R, desc: PropertyMetadata, value: Int) {
|
||||
}
|
||||
|
||||
+2
-2
@@ -2,7 +2,7 @@ val x: Int <caret>by Foo()
|
||||
|
||||
class Foo
|
||||
|
||||
fun Foo.get(_this: Any?, p: Any?): Int = 1
|
||||
fun Foo.getValue(_this: Any?, p: Any?): Int = 1
|
||||
|
||||
// REF: (for Foo in <root>).get(Any?,Any?)
|
||||
// REF: (for Foo in <root>).getValue(Any?,Any?)
|
||||
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
val x: Int <caret>by Foo()
|
||||
|
||||
class Foo {
|
||||
fun get(_this: Any?, p: Any?): Int = 1
|
||||
fun getValue(_this: Any?, p: Any?): Int = 1
|
||||
}
|
||||
|
||||
// REF: (in Foo).get(Any?,Any?)
|
||||
// REF: (in Foo).getValue(Any?,Any?)
|
||||
|
||||
|
||||
Vendored
+6
-6
@@ -1,20 +1,20 @@
|
||||
var x : Int <caret>by Baz()
|
||||
|
||||
interface Foo {
|
||||
fun get(p1: Any?, p2: Any?): Int = 1
|
||||
fun getValue(p1: Any?, p2: Any?): Int = 1
|
||||
}
|
||||
|
||||
interface Bar {
|
||||
fun get(p1: Any?, p2: Any?): Int
|
||||
fun getValue(p1: Any?, p2: Any?): Int
|
||||
}
|
||||
|
||||
interface Zoo {
|
||||
fun set(p1: Any?, p2: Any?, p3: Any?)
|
||||
fun setValue(p1: Any?, p2: Any?, p3: Any?)
|
||||
}
|
||||
|
||||
class Baz: Foo, Bar, Zoo
|
||||
|
||||
// MULTIRESOLVE
|
||||
// REF: (in Bar).get(Any?,Any?)
|
||||
// REF: (in Foo).get(Any?,Any?)
|
||||
// REF: (in Zoo).set(Any?,Any?,Any?)
|
||||
// REF: (in Bar).getValue(Any?,Any?)
|
||||
// REF: (in Foo).getValue(Any?,Any?)
|
||||
// REF: (in Zoo).setValue(Any?,Any?,Any?)
|
||||
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
var x : Int <caret>by Baz()
|
||||
|
||||
interface Foo {
|
||||
fun get(p1: Any?, p2: Any?): Int = 1
|
||||
fun getValue(p1: Any?, p2: Any?): Int = 1
|
||||
}
|
||||
|
||||
class Baz: Foo
|
||||
|
||||
// REF: (in Foo).get(Any?,Any?)
|
||||
// REF: (in Foo).getValue(Any?,Any?)
|
||||
+4
-4
@@ -2,12 +2,12 @@ var x: Int <caret>by Foo()
|
||||
|
||||
class Foo
|
||||
|
||||
fun Foo.get(_this: Any?, p: Any?): Int = 1
|
||||
fun Foo.set(_this: Any?, p: Any?, val: Any?) {}
|
||||
fun Foo.getValue(_this: Any?, p: Any?): Int = 1
|
||||
fun Foo.setValue(_this: Any?, p: Any?, val: Any?) {}
|
||||
fun Foo.propertyDelegated(p: Any?) {}
|
||||
|
||||
// MULTIRESOLVE
|
||||
// REF: (for Foo in <root>).get(Any?,Any?)
|
||||
// REF: (for Foo in <root>).set(Any?,Any?,Any?)
|
||||
// REF: (for Foo in <root>).getValue(Any?,Any?)
|
||||
// REF: (for Foo in <root>).setValue(Any?,Any?,Any?)
|
||||
// REF: (for Foo in <root>).propertyDelegated(Any?)
|
||||
|
||||
|
||||
+4
-4
@@ -1,13 +1,13 @@
|
||||
var x: Int <caret>by Foo()
|
||||
|
||||
class Foo {
|
||||
fun get(_this: Any?, p: Any?): Int = 1
|
||||
fun set(_this: Any?, p: Any?, val: Any?) {}
|
||||
fun getValue(_this: Any?, p: Any?): Int = 1
|
||||
fun setValue(_this: Any?, p: Any?, val: Any?) {}
|
||||
fun propertyDelegated(p: Any?)
|
||||
}
|
||||
|
||||
// MULTIRESOLVE
|
||||
// REF: (in Foo).get(Any?,Any?)
|
||||
// REF: (in Foo).set(Any?,Any?,Any?)
|
||||
// REF: (in Foo).getValue(Any?,Any?)
|
||||
// REF: (in Foo).setValue(Any?,Any?,Any?)
|
||||
// REF: (in Foo).propertyDelegated(Any?)
|
||||
|
||||
|
||||
+1
-1
@@ -2,4 +2,4 @@ import kotlin.properties.Delegates
|
||||
|
||||
val x: Int <caret>by Delegates.lazy {1}
|
||||
|
||||
// REF: (in kotlin.properties.ReadOnlyProperty).get(R,kotlin.PropertyMetadata)
|
||||
// REF: (in kotlin.properties.ReadOnlyProperty).getValue(R,kotlin.PropertyMetadata)
|
||||
+2
-2
@@ -3,5 +3,5 @@ import kotlin.properties.Delegates
|
||||
var x: Int <caret>by Delegates.notNull()
|
||||
|
||||
// MULTIRESOLVE
|
||||
// REF: (in kotlin.properties.ReadWriteProperty).get(R,kotlin.PropertyMetadata)
|
||||
// REF: (in kotlin.properties.ReadWriteProperty).set(R,kotlin.PropertyMetadata,T)
|
||||
// REF: (in kotlin.properties.ReadWriteProperty).getValue(R,kotlin.PropertyMetadata)
|
||||
// REF: (in kotlin.properties.ReadWriteProperty).setValue(R,kotlin.PropertyMetadata,T)
|
||||
Reference in New Issue
Block a user