Change resolution priority about implicit receivers and synthesized member-like descriptors.
Change resolution to consider extensions to implicit receiver before members of another implicit receiver. Make synthesized member-like extensions resolve right after the members. #KT-10510 Fixed #KT-10219 Fixed
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
// !CHECK_TYPE
|
||||
// !DIAGNOSTICS: -UNUSED_EXPRESSION -UNUSED_PARAMETER -UNUSED_VARIABLE
|
||||
|
||||
|
||||
class A
|
||||
|
||||
fun A.foo() = this
|
||||
|
||||
fun test(a: A) {
|
||||
fun A.foo() = 3
|
||||
|
||||
a.foo() checkType { _<Int>() }
|
||||
with(a) {
|
||||
foo() checkType { _<Int>() }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
fun <T, R> with(receiver: T, f: T.() -> R): R = receiver.f()
|
||||
Reference in New Issue
Block a user