mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-26 03:13:40 +07:00
private method is not available from anonymous class via this (IDEA-78916)
This commit is contained in:
+38
@@ -0,0 +1,38 @@
|
||||
enum EnumPrivateMethodTest {
|
||||
FIRST {
|
||||
@Override
|
||||
public void execute() {
|
||||
this.<error descr="'firstMethod()' has private access in 'EnumPrivateMethodTest'">firstMethod</error>();
|
||||
}
|
||||
};
|
||||
|
||||
public abstract void execute();
|
||||
|
||||
private void firstMethod() {}
|
||||
}
|
||||
|
||||
abstract class EnumPrivateMethodTest1 {
|
||||
EnumPrivateMethodTest1 FIRST = new EnumPrivateMethodTest1() {
|
||||
@Override
|
||||
public void execute() {
|
||||
this.<error descr="'firstMethod()' has private access in 'EnumPrivateMethodTest1'">firstMethod</error>();
|
||||
}
|
||||
};
|
||||
|
||||
public abstract void execute();
|
||||
|
||||
private void firstMethod() {}
|
||||
}
|
||||
|
||||
abstract class EnumPrivateMethodTest2 {
|
||||
EnumPrivateMethodTest2 FIRST = new EnumPrivateMethodTest2() {
|
||||
@Override
|
||||
public void execute() {
|
||||
firstMethod();
|
||||
}
|
||||
};
|
||||
|
||||
public abstract void execute();
|
||||
|
||||
private void firstMethod() {}
|
||||
}
|
||||
Reference in New Issue
Block a user