Files
openide/java/java-tests/testData/codeInsight/daemonCodeAnalyzer/advHighlighting/AmbiguousConstants.java
T
Anna Kozlova e5e87e397d java resolve: fallback to resolve to ambiguous variable reference (IDEA-252122)
GitOrigin-RevId: 0076510ca5814c3db0a12d25aeea0e4105a6f4f5
2020-10-05 09:31:19 +00:00

31 lines
565 B
Java

class MultipleInheritance {
interface A {
int X = 1;
String FOO = "foo";
}
interface B extends A {
int X = 2;
String FOO = "foo";
}
interface C extends A, B {
int Y = C.<error descr="Reference to 'X' is ambiguous, both 'A.X' and 'B.X' match">X</error>;
String BAR = C.<error descr="Reference to 'FOO' is ambiguous, both 'A.FOO' and 'B.FOO' match">FOO</error>.substring(1);
}
}
class Shadowing {
interface A {
int X = 1;
}
interface B extends A {
int X = 2;
}
interface C extends B {
int Y = C.X;
}
}