FIR: Fix ambiguity between current Companion and one from supertypes

Companion as qualifier should be found at static scope not a member one
This commit is contained in:
Denis Zharkov
2020-11-06 17:41:50 +03:00
parent 96352b9c8c
commit a5545b96cb
21 changed files with 114 additions and 216 deletions
@@ -25,29 +25,29 @@ object Obj {
fun test(with: WithClassObject, without: WithoutClassObject, obj: Obj) {
with.<!UNRESOLVED_REFERENCE!>Nested<!>()
with.NestedWithClassObject
with.<!UNRESOLVED_REFERENCE!>NestedWithClassObject<!>
with.<!UNRESOLVED_REFERENCE!>NestedWithClassObject<!>()
with.NestedWithClassObject.foo()
with.NestedEnum.A
with.NestedObj
with.NestedObj()
with.NestedObj.foo()
with.<!UNRESOLVED_REFERENCE!>NestedWithClassObject<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
with.<!UNRESOLVED_REFERENCE!>NestedEnum<!>.<!UNRESOLVED_REFERENCE!>A<!>
with.<!UNRESOLVED_REFERENCE!>NestedObj<!>
with.<!UNRESOLVED_REFERENCE!>NestedObj<!>()
with.<!UNRESOLVED_REFERENCE!>NestedObj<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
without.<!UNRESOLVED_REFERENCE!>Nested<!>()
without.NestedWithClassObject
without.<!UNRESOLVED_REFERENCE!>NestedWithClassObject<!>
without.<!UNRESOLVED_REFERENCE!>NestedWithClassObject<!>()
without.NestedWithClassObject.foo()
without.NestedEnum.A
without.NestedObj
without.NestedObj()
without.NestedObj.foo()
without.<!UNRESOLVED_REFERENCE!>NestedWithClassObject<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
without.<!UNRESOLVED_REFERENCE!>NestedEnum<!>.<!UNRESOLVED_REFERENCE!>A<!>
without.<!UNRESOLVED_REFERENCE!>NestedObj<!>
without.<!UNRESOLVED_REFERENCE!>NestedObj<!>()
without.<!UNRESOLVED_REFERENCE!>NestedObj<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
obj.<!UNRESOLVED_REFERENCE!>Nested<!>()
obj.NestedWithClassObject
obj.<!UNRESOLVED_REFERENCE!>NestedWithClassObject<!>
obj.<!UNRESOLVED_REFERENCE!>NestedWithClassObject<!>()
obj.NestedWithClassObject.foo()
obj.NestedEnum.A
obj.NestedObj
obj.NestedObj()
obj.NestedObj.foo()
}
obj.<!UNRESOLVED_REFERENCE!>NestedWithClassObject<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
obj.<!UNRESOLVED_REFERENCE!>NestedEnum<!>.<!UNRESOLVED_REFERENCE!>A<!>
obj.<!UNRESOLVED_REFERENCE!>NestedObj<!>
obj.<!UNRESOLVED_REFERENCE!>NestedObj<!>()
obj.<!UNRESOLVED_REFERENCE!>NestedObj<!>.<!UNRESOLVED_REFERENCE!>foo<!>()
}