[FIR] Use correct source for implicit this receiver

#KT-57489 Fixed
#KT-56139 Fixed
#KT-56755 Fixed
This commit is contained in:
Ivan Kylchik
2023-05-10 12:51:47 +02:00
committed by Space Team
parent ab03cb2357
commit 8f88f08573
23 changed files with 286 additions and 36 deletions
@@ -0,0 +1,45 @@
// FILE: test.kt
fun box() {
test(B(A()))
}
class A
class B(val a: A) {
operator fun A.invoke() {}
}
fun test(b: B) {
with(b) {
a()
}
}
// EXPECTATIONS JVM JVM_IR
// test.kt:4 box
// test.kt:7 <init>
// test.kt:4 box
// test.kt:9 <init>
// test.kt:4 box
// test.kt:14 test
// test.kt:15 test
// test.kt:9 getA
// test.kt:15 test
// test.kt:10 invoke
// test.kt:16 test
// test.kt:14 test
// test.kt:17 test
// test.kt:5 box
// EXPECTATIONS JS_IR
// test.kt:4 box
// test.kt:7 <init>
// test.kt:4 box
// test.kt:9 <init>
// test.kt:9 <init>
// test.kt:4 box
// test.kt:10 invoke
// test.kt:17 test
// test.kt:5 box