K2: add test to confirm KT-54139 now works properly

This commit is contained in:
Mikhail Glukhikh
2023-11-08 12:02:21 +01:00
committed by Space Team
parent bb608740cd
commit cf9bd44cf7
9 changed files with 68 additions and 0 deletions
@@ -0,0 +1,21 @@
// LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
// ISSUE: KT-54139
class A
class B
fun B.extensionFunction() {}
context(A, B)
fun test() {
extensionFunction()
}
fun box(): String {
with(A()) {
with(B()) {
test()
}
}
return "OK"
}