[FIR] Resolve ambiguities in Java static scopes

This commit is contained in:
Mikhail Glukhikh
2020-01-28 19:28:35 +03:00
parent 4c8905b00f
commit 2bb5740f47
16 changed files with 130 additions and 53 deletions
@@ -44,7 +44,7 @@ fun use(a: A, b: B, c: C) {
c.f()
A.D
B.<!AMBIGUITY!>D<!>
B.D
C.D
A.bar()
@@ -13,4 +13,4 @@ public class Bbb extends Aaa {
// FILE: b.kt
fun foo() = Bbb.<!AMBIGUITY!>i<!>
fun foo() = Bbb.i
@@ -4,9 +4,9 @@ import aa.B
fun use() {
// checking that CONST is of platform type
B.<!AMBIGUITY!>CONST<!> = null
B.<!AMBIGUITY!>CONST<!>?.<!UNRESOLVED_REFERENCE!>length<!>
B.<!AMBIGUITY!>CONST<!>.<!UNRESOLVED_REFERENCE!>length<!>
B.CONST = null
B.CONST?.length
B.CONST.length
}
// FILE: aa/A.java
@@ -30,7 +30,7 @@ fun test() {
B.a
B.foo()
B.foo(1)
B.<!AMBIGUITY!>b<!>
B.b
B.bar()
B.bar(1)
}
@@ -28,5 +28,5 @@ fun test() {
B.field
E.<!AMBIGUITY!>field<!>
O.<!AMBIGUITY!>field<!>
O.field
}
@@ -25,8 +25,8 @@ public class O implements A, B {
fun test() {
A.field
B.<!AMBIGUITY!>field<!>
B.field
E.<!AMBIGUITY!>field<!>
O.<!AMBIGUITY!>field<!>
O.field
}
@@ -57,10 +57,10 @@ fun test() {
D.field
E.<!AMBIGUITY!>field<!>
O.<!AMBIGUITY!>field<!>
O.field
EE.<!AMBIGUITY!>field<!>
EO.<!AMBIGUITY!>field<!>
EO.field
OO.<!AMBIGUITY!>field<!>
OO.field
}
@@ -47,7 +47,7 @@ fun test() {
D.bar()
D.baz()
E.<!AMBIGUITY!>a<!>
E.a
E.b
E.c
E.bar()