mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-03 20:33:31 +07:00
GitOrigin-RevId: 22a46c15d8900d8a31514846755a013f6a67ad42
9 lines
455 B
Java
9 lines
455 B
Java
// "Simplify boolean expression" "true-preview"
|
|
class A {
|
|
boolean a = true;
|
|
boolean b = true;
|
|
boolean x = a ^ false; // intention "simplify boolean expression" does nothing here, expected: boolean x = a;
|
|
boolean x1 = a ^ true; // expected: boolean x1 = !a; fails, does nothing
|
|
boolean y = a ^ true ^ b; // intention replaces with a ^ b, expected !(a ^ b) fails
|
|
boolean y1 = a ^ b; // expected boolean y1 = a ^ b works correctly;
|
|
} |