IR: copy context receiver parameters count in FakeOverrideCopier
#KT-63430 Fixed
This commit is contained in:
committed by
Space Team
parent
fc64e30829
commit
54705e5afc
@@ -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()
|
||||
}
|
||||
Reference in New Issue
Block a user