Compound extension

I think the resolution rules should strive to be consistent with the current strategy for multiple receiver functions:

interface A {
    fun B.foo() {
        println("dispatch receiver is ${this@A}, extension receiver is ${this}")
    }
}

interface B

data class C(val name: String) : A, B

fun main() {
    val c1 = C("C1")
    val c2 = C("C2")

    with(c1) { foo() }
    with(c1) { with(c2) { foo() } }
    with(c2) { with(c1) { foo() } }
}