IR: copy context receiver parameters count in FakeOverrideCopier

#KT-63430 Fixed
This commit is contained in:
Alexander Udalov
2023-11-13 16:08:00 +01:00
committed by Space Team
parent fc64e30829
commit 54705e5afc
10 changed files with 74 additions and 0 deletions
@@ -0,0 +1,26 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// WITH_STDLIB
abstract class A {
context(C)
fun P.foo(): String = result
}
class B : A() {
val p = P()
context(C)
fun test(): String =
p.run {
foo()
}
}
class P
class C(val result: String)
fun box(): String =
with(C("OK")) {
B().test()
}