// !LANGUAGE: +ContextReceivers // TARGET_BACKEND: JVM_IR class Components(val x: String) context(Components) abstract class A(val y: F) { fun foo(): String = x + y } context(Components) class B(y: String) : A(y) fun box(): String { return with(Components("O")) { B("K").foo() } }