Update IDE tests to use KProperty instead of PropertyMetadata
Original commit: 6a965c9a06
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
package foo.bar
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
/*p:foo.bar*/class D1 {
|
||||
fun get(t: /*c:foo.bar.D1 p:foo.bar*/Any?, p: /*c:foo.bar.D1 p:foo.bar*/PropertyMetadata) = 1
|
||||
fun get(t: /*c:foo.bar.D1 p:foo.bar*/Any?, p: /*c:foo.bar.D1*/KProperty<*>) = 1
|
||||
}
|
||||
|
||||
/*p:foo.bar*/fun /*p:foo.bar*/D1.set(t: /*p:foo.bar*/Any?, p: /*p:foo.bar*/PropertyMetadata, v: /*p:foo.bar*/Int) {}
|
||||
/*p:foo.bar*/fun /*p:foo.bar*/D1.set(t: /*p:foo.bar*/Any?, p: KProperty<*>, v: /*p:foo.bar*/Int) {}
|
||||
|
||||
/*p:foo.bar(D2)*/open class D2 {
|
||||
fun set(t: /*c:foo.bar.D2 p:foo.bar*/Any?, p: /*c:foo.bar.D2 p:foo.bar*/PropertyMetadata, v: /*c:foo.bar.D2 p:foo.bar*/Int) {}
|
||||
fun set(t: /*c:foo.bar.D2 p:foo.bar*/Any?, p: /*c:foo.bar.D2*/KProperty<*>, v: /*c:foo.bar.D2 p:foo.bar*/Int) {}
|
||||
}
|
||||
|
||||
/*p:foo.bar*/fun /*p:foo.bar*/D2.get(t: /*p:foo.bar*/Any?, p: /*p:foo.bar*/PropertyMetadata) = 1
|
||||
/*p:foo.bar*/fun /*p:foo.bar*/D2.get(t: /*p:foo.bar*/Any?, p: KProperty<*>) = 1
|
||||
/*p:foo.bar*/fun /*p:foo.bar*/D2.propertyDelegated(p: /*p:foo.bar*/Any?) {}
|
||||
|
||||
/*p:foo.bar*/class D3 : /*p:foo.bar*/D2() {
|
||||
|
||||
+3
@@ -7,7 +7,9 @@ Compiling files:
|
||||
src/inlineGet.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/usage/UsageVal$x$1.class
|
||||
out/production/module/usage/UsageVal.class
|
||||
out/production/module/usage/UsageVar$x$1.class
|
||||
out/production/module/usage/UsageVar.class
|
||||
End of files
|
||||
Compiling files:
|
||||
@@ -25,6 +27,7 @@ Compiling files:
|
||||
src/inlineSet.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/usage/UsageVar$x$1.class
|
||||
out/production/module/usage/UsageVar.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
+4
-2
@@ -1,5 +1,7 @@
|
||||
package inline
|
||||
|
||||
inline fun Inline.getValue(receiver: Any?, prop: PropertyMetadata): Int {
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
inline fun Inline.getValue(receiver: Any?, prop: KProperty<*>): Int {
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,5 +1,7 @@
|
||||
package inline
|
||||
|
||||
inline fun Inline.getValue(receiver: Any?, prop: PropertyMetadata): Int {
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
inline fun Inline.getValue(receiver: Any?, prop: KProperty<*>): Int {
|
||||
return 1
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,5 +1,7 @@
|
||||
package inline
|
||||
|
||||
inline fun Inline.setValue(receiver: Any?, prop: PropertyMetadata, value: Int) {
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
inline fun Inline.setValue(receiver: Any?, prop: KProperty<*>, value: Int) {
|
||||
println(value)
|
||||
}
|
||||
}
|
||||
|
||||
+4
-2
@@ -1,5 +1,7 @@
|
||||
package inline
|
||||
|
||||
inline fun Inline.setValue(receiver: Any?, prop: PropertyMetadata, value: Int) {
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
inline fun Inline.setValue(receiver: Any?, prop: KProperty<*>, value: Int) {
|
||||
println(value * 2)
|
||||
}
|
||||
}
|
||||
|
||||
+3
@@ -5,7 +5,9 @@ Compiling files:
|
||||
src/inline.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/usage/UsageVal$x$1.class
|
||||
out/production/module/usage/UsageVal.class
|
||||
out/production/module/usage/UsageVar$x$1.class
|
||||
out/production/module/usage/UsageVar.class
|
||||
End of files
|
||||
Compiling files:
|
||||
@@ -21,6 +23,7 @@ Compiling files:
|
||||
src/inline.kt
|
||||
End of files
|
||||
Cleaning output files:
|
||||
out/production/module/usage/UsageVar$x$1.class
|
||||
out/production/module/usage/UsageVar.class
|
||||
End of files
|
||||
Compiling files:
|
||||
|
||||
+5
-3
@@ -1,11 +1,13 @@
|
||||
package inline
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Inline {
|
||||
inline fun getValue(receiver: Any?, prop: PropertyMetadata): Int {
|
||||
inline fun getValue(receiver: Any?, prop: KProperty<*>): Int {
|
||||
return 0
|
||||
}
|
||||
|
||||
inline fun setValue(receiver: Any?, prop: PropertyMetadata, value: Int) {
|
||||
inline fun setValue(receiver: Any?, prop: KProperty<*>, value: Int) {
|
||||
println(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-3
@@ -1,11 +1,13 @@
|
||||
package inline
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Inline {
|
||||
inline fun getValue(receiver: Any?, prop: PropertyMetadata): Int {
|
||||
inline fun getValue(receiver: Any?, prop: KProperty<*>): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
inline fun setValue(receiver: Any?, prop: PropertyMetadata, value: Int) {
|
||||
inline fun setValue(receiver: Any?, prop: KProperty<*>, value: Int) {
|
||||
println(value)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+5
-3
@@ -1,11 +1,13 @@
|
||||
package inline
|
||||
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Inline {
|
||||
inline fun getValue(receiver: Any?, prop: PropertyMetadata): Int {
|
||||
inline fun getValue(receiver: Any?, prop: KProperty<*>): Int {
|
||||
return 1
|
||||
}
|
||||
|
||||
inline fun setValue(receiver: Any?, prop: PropertyMetadata, value: Int) {
|
||||
inline fun setValue(receiver: Any?, prop: KProperty<*>, value: Int) {
|
||||
println(value * 2)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user