blob: f1c1544896891fcfcd75f006c503856424c0f37c [file] [log] [blame]
class A {
~A.foo~fun foo() = 1
}
class B {
}
~B.foo~fun B.foo() = 2
fun test(a: A, b: B) {
with (a) {
with (b) {
`B.foo`foo()
}
}
}
fun <T, R> with(receiver: T, f: T.() -> R) : R = receiver.f()