[FIR] Fix generating this reference in delegated accessors
There was a problem with delegated extension property with dispatch receiver that `this` in `getValue` call was set to dispatch receiver instead of extension one
This commit is contained in:
committed by
TeamCityServer
parent
4e5647090e
commit
ea2783eace
-1
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
import kotlin.reflect.KProperty
|
||||
|
||||
class Delegate {
|
||||
|
||||
Vendored
+1
-2
@@ -1,6 +1,5 @@
|
||||
// !LANGUAGE: -NewInference
|
||||
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
inline operator fun Double.provideDelegate(thisRef: Any?, kProp: Any?) = this.toLong()
|
||||
|
||||
inline operator fun Long.getValue(thisRef: Any?, kProp: Any?) = this.toInt()
|
||||
@@ -59,4 +58,4 @@ fun box(): String {
|
||||
x.test(intArray)
|
||||
|
||||
return "OK"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -1,4 +1,3 @@
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// WITH_RUNTIME
|
||||
|
||||
object Host {
|
||||
@@ -13,4 +12,4 @@ object Host {
|
||||
val ok = "O".plusK
|
||||
}
|
||||
|
||||
fun box(): String = Host.ok
|
||||
fun box(): String = Host.ok
|
||||
|
||||
+1
-2
@@ -1,6 +1,5 @@
|
||||
// DONT_TARGET_EXACT_BACKEND: WASM
|
||||
// WASM_MUTE_REASON: PROPERTY_REFERENCES
|
||||
// IGNORE_BACKEND_FIR: JVM_IR
|
||||
// IGNORE_BACKEND: NATIVE
|
||||
//For KT-6020
|
||||
|
||||
@@ -59,4 +58,4 @@ fun box(): String {
|
||||
val p = Value("O", CR("K"))
|
||||
val rr = p.additionalText
|
||||
return rr.p1 + rr.p2
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user