blob: 86aee0b3ce71883482d3ffe16488ba225bd0b617 [file]
// LANGUAGE: +ContextParameters
interface I<T>{
context(a: A)
fun T.foo(): String
}
class A(val a: String)
class B(val b: String)
object O: I<B>{
context(a: A)
override fun B.foo(): String = a.a + this@foo.b
}
fun box(): String {
with(A("O")){
with(O as I<B>){
return B("K").foo()
}
}
}