mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-17 07:20:53 +07:00
Push Down: super should not access over hierarchy (IDEA-20816)
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
class A {
|
||||
void k() {
|
||||
System.out.println(23);
|
||||
}
|
||||
}
|
||||
|
||||
class B extends A {
|
||||
void k() {
|
||||
System.out.println(42);
|
||||
}
|
||||
|
||||
void <caret>m() {
|
||||
new C() {
|
||||
void foo() {
|
||||
super.k();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
public class C extends B {
|
||||
public static void main(String[] args) {
|
||||
new C().m();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user