KT-54357 Fix passing of context receivers to object literal constructors

This commit is contained in:
Pavel Mikhailovskii
2022-12-27 11:52:36 +00:00
committed by Space Team
parent fff593492d
commit 9ca5e1b421
4 changed files with 34 additions and 1 deletions
@@ -0,0 +1,20 @@
// !LANGUAGE: +ContextReceivers
// TARGET_BACKEND: JVM_IR
fun box(): String {
with(A()) {
object : B(){
init {
foo()
}
}
}
return "OK"
}
class A {
fun foo() {}
}
context(A)
open class B