[FIR] Use correct source for implicit this receiver
#KT-57489 Fixed #KT-56139 Fixed #KT-56755 Fixed
This commit is contained in:
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2_LIGHT_TREE: JVM_IR
|
||||
// Reason: KT-56755
|
||||
|
||||
|
||||
// FILE: test.kt
|
||||
fun blockFun(blockArg: String.() -> Unit) =
|
||||
"OK".blockArg()
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2_LIGHT_TREE: JVM_IR
|
||||
// Reason: KT-56755
|
||||
|
||||
|
||||
// FILE: test.kt
|
||||
fun blockFun(blockArg: String.() -> Unit) =
|
||||
"OK".blockArg()
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2_LIGHT_TREE: JVM_IR
|
||||
// Reason: KT-56755
|
||||
|
||||
|
||||
// FILE: test.kt
|
||||
fun blockFun(blockArg: String.() -> Unit) =
|
||||
"OK".blockArg()
|
||||
|
||||
Vendored
+2
-2
@@ -1,5 +1,5 @@
|
||||
// IGNORE_BACKEND_K2_LIGHT_TREE: JVM_IR
|
||||
// Reason: KT-56755
|
||||
|
||||
|
||||
// FILE: test.kt
|
||||
fun blockFun(blockArg: String.() -> Unit) =
|
||||
"OK".blockArg()
|
||||
|
||||
@@ -0,0 +1,68 @@
|
||||
// FILE: test.kt
|
||||
|
||||
fun box() {
|
||||
A().test()
|
||||
}
|
||||
|
||||
class A {
|
||||
fun test() {
|
||||
//Breakpoint!
|
||||
foo()
|
||||
prop
|
||||
prop = 2
|
||||
}
|
||||
|
||||
companion object {
|
||||
private fun foo() {
|
||||
val a = 1
|
||||
}
|
||||
|
||||
private var prop: Int = 2
|
||||
get() {
|
||||
return 1
|
||||
}
|
||||
set(i: Int) {
|
||||
field = i
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// EXPECTATIONS JVM JVM_IR
|
||||
// test.kt:4 box
|
||||
// test.kt:20 <clinit>
|
||||
// test.kt:15 <init>
|
||||
// test.kt:20 <clinit>
|
||||
// test.kt:20 <clinit>
|
||||
// test.kt:4 box
|
||||
|
||||
// test.kt:7 <init>
|
||||
// test.kt:4 box
|
||||
// test.kt:10 test
|
||||
// test.kt:17 foo
|
||||
// test.kt:18 foo
|
||||
// test.kt:11 test
|
||||
// test.kt:22 getProp
|
||||
// test.kt:11 test
|
||||
// test.kt:12 test
|
||||
// test.kt:25 setProp
|
||||
// test.kt:26 setProp
|
||||
// test.kt:13 test
|
||||
// test.kt:5 box
|
||||
|
||||
// EXPECTATIONS JS_IR
|
||||
// test.kt:4 box
|
||||
// test.kt:7 <init>
|
||||
// test.kt:20 <init>
|
||||
// test.kt:15 <init>
|
||||
// test.kt:7 <init>
|
||||
// test.kt:4 box
|
||||
// test.kt:10 test
|
||||
// test.kt:10 test
|
||||
// test.kt:17 foo
|
||||
// test.kt:18 foo
|
||||
// test.kt:11 test
|
||||
// test.kt:11 test
|
||||
// test.kt:22 <get-prop>
|
||||
// test.kt:12 test
|
||||
// test.kt:13 test
|
||||
// test.kt:5 box
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user