KT-52373 Fix generation of synthetic functions with context receivers and default parameters

This commit is contained in:
Pavel Mikhailovskii
2022-12-07 16:40:07 +01:00
committed by Space Team
parent 4fa701f798
commit 76997edebe
4 changed files with 83 additions and 23 deletions
@@ -0,0 +1,18 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
class Context
class Extended
class Containing {
context(Context) fun Extended.foo(obj: Any? = null) {}
}
fun box(): String {
with (Containing()) {
with (Context()) {
Extended().foo()
}
}
return "OK"
}