KT-54357 Fix passing of context receivers to object literal constructors
This commit is contained in:
committed by
Space Team
parent
fff593492d
commit
9ca5e1b421
@@ -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
|
||||
Reference in New Issue
Block a user