mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 00:11:26 +07:00
ambiguous constants references: shadowing (IDEA-146058)
This commit is contained in:
+28
@@ -0,0 +1,28 @@
|
||||
|
||||
class MultipleInheritance {
|
||||
interface A {
|
||||
int X = 1;
|
||||
}
|
||||
|
||||
interface B extends A {
|
||||
int X = 2;
|
||||
}
|
||||
|
||||
interface C extends A, B {
|
||||
int Y = C.<error descr="Reference to 'X' is ambiguous, both 'A.X' and 'B.X' match">X</error>;
|
||||
}
|
||||
}
|
||||
|
||||
class Shadowing {
|
||||
interface A {
|
||||
int X = 1;
|
||||
}
|
||||
|
||||
interface B extends A {
|
||||
int X = 2;
|
||||
}
|
||||
|
||||
interface C extends B {
|
||||
int Y = C.X;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user