[FIR] Use static & qualified scopes to access qualified callables

This commit provides more correct logic for creating scopes based
on FirResolvedQualifier & eliminates QualifiedReceiverTowerDataConsumer
This commit is contained in:
Mikhail Glukhikh
2020-01-13 17:43:52 +03:00
parent 6bbfb2ffe9
commit f0ced642d9
29 changed files with 250 additions and 221 deletions
@@ -28,7 +28,7 @@ class X: A {
init {
A_S()
A.A_S()
X.A_S()
X.<!UNRESOLVED_REFERENCE!>A_S<!>()
}
object xD {
@@ -51,7 +51,7 @@ class Y: B() {
B_S()
B.B_S()
Y.B_S()
Y.<!UNRESOLVED_REFERENCE!>B_S<!>()
}
object X {
@@ -43,20 +43,20 @@ class X: D() {
A_S()
A.A_S()
C.A_S()
D.A_S()
X.A_S()
C.<!UNRESOLVED_REFERENCE!>A_S<!>()
D.<!UNRESOLVED_REFERENCE!>A_S<!>()
X.<!UNRESOLVED_REFERENCE!>A_S<!>()
B_S()
B.B_S()
C.B_S()
D.B_S()
X.B_S()
C.<!UNRESOLVED_REFERENCE!>B_S<!>()
D.<!UNRESOLVED_REFERENCE!>B_S<!>()
X.<!UNRESOLVED_REFERENCE!>B_S<!>()
E_S()
E.E_S()
D.E_S()
X.E_S()
D.<!UNRESOLVED_REFERENCE!>E_S<!>()
X.<!UNRESOLVED_REFERENCE!>E_S<!>()
}
}
@@ -68,15 +68,15 @@ class Y: F() {
Y.<!UNRESOLVED_REFERENCE!>B_<!>()
A_S()
F.A_S()
Y.A_S()
F.<!UNRESOLVED_REFERENCE!>A_S<!>()
Y.<!UNRESOLVED_REFERENCE!>A_S<!>()
B_S()
F.B_S()
Y.B_S()
F.<!UNRESOLVED_REFERENCE!>B_S<!>()
Y.<!UNRESOLVED_REFERENCE!>B_S<!>()
E_S()
F.E_S()
Y.E_S()
F.<!UNRESOLVED_REFERENCE!>E_S<!>()
Y.<!UNRESOLVED_REFERENCE!>E_S<!>()
}
}
@@ -31,9 +31,9 @@ fun test() {
C.b
C.bar()
K.a
K.b
K.bar()
K.<!UNRESOLVED_REFERENCE!>a<!>
K.<!UNRESOLVED_REFERENCE!>b<!>
K.<!UNRESOLVED_REFERENCE!>bar<!>()
D.a
D.b
@@ -37,9 +37,9 @@ fun test() {
C.b
C.bar()
K.a
K.b
K.bar()
K.<!UNRESOLVED_REFERENCE!>a<!>
K.<!UNRESOLVED_REFERENCE!>b<!>
K.<!UNRESOLVED_REFERENCE!>bar<!>()
D.a
D.b
@@ -31,8 +31,8 @@ class XN: X() {
init {
foo()
A.foo()
X.foo()
XN.foo()
X.<!UNRESOLVED_REFERENCE!>foo<!>()
XN.<!UNRESOLVED_REFERENCE!>foo<!>()
}
}
@@ -40,12 +40,12 @@ class YN: Y() {
init {
foo()
A.foo()
Y.foo()
YN.foo()
Y.<!UNRESOLVED_REFERENCE!>foo<!>()
YN.<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
B.bar()
Y.bar()
YN.bar()
Y.<!UNRESOLVED_REFERENCE!>bar<!>()
YN.<!UNRESOLVED_REFERENCE!>bar<!>()
}
}
@@ -16,12 +16,12 @@ class D: C() {
init {
foo()
A.foo()
B.foo()
B.<!UNRESOLVED_REFERENCE!>foo<!>()
C.foo()
D.foo()
D.<!UNRESOLVED_REFERENCE!>foo<!>()
bar()
C.bar()
D.bar()
D.<!UNRESOLVED_REFERENCE!>bar<!>()
}
}