Account for context class receivers when creating the ExpressionReceiver

^KT-54084 Fixed
This commit is contained in:
Nikita Nazarov
2022-09-19 03:46:42 +03:00
committed by Nikita Nazarov
parent f578381726
commit bd742bb95c
12 changed files with 227 additions and 4 deletions
@@ -0,0 +1,31 @@
class Context {
constructor() /* primary */ {
super/*Any*/()
/* <init>() */
}
fun foo(): Int {
return 1
}
}
class Test {
private /* final field */ val contextReceiverField0: Context
constructor(<this>: Context) /* primary */ {
super/*Any*/()
<this>.#contextReceiverField0 = <this>
/* <init>() */
}
fun foo(): Int {
return 2
}
fun bar() {
val x: Int = <this>.#contextReceiverField0.foo()
}
}