invert boolean for anonymous classes (IDEA-71076)

This commit is contained in:
anna
2011-06-20 19:08:47 +04:00
parent b130e75e43
commit 91d3996e1c
4 changed files with 53 additions and 2 deletions

View File

@@ -0,0 +1,23 @@
abstract class DemoInvertBoolean {
boolean b;
DemoInvertBoolean(boolean <caret>bInverted) {
this.b = !bInverted;
}
DemoInvertBoolean() {
this(false);//this true will be inverted
}
abstract void f1();
public static void main(String[] args) {
DemoInvertBoolean demo = new DemoInvertBoolean(false) {//this true will not be inverted
@Override
public void f1() {
}
};
}
}