blob: 924def4fdb304b6f6b936bdc282d1543f2168fae [file]
// LANGUAGE: +ContextParameters
// WITH_STDLIB
abstract class A {
context(c: C)
fun P.foo(): String = c.result
}
class B : A() {
val p = P()
context(c: C)
fun test(): String =
p.run {
foo()
}
}
class P
class C(val result: String)
fun box(): String =
with(C("OK")) {
B().test()
}