Files
kotlin-fork/compiler/testData/resolve/candidatesPriority/extensionToCloserReceiverVsMember.resolve
T
Svetlana Isakova 3cf133bff7 changed local extensions priority
local extensions aren't longer chosen before members
2013-06-20 13:43:01 +04:00

16 lines
228 B
Plaintext

class A {
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()