mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-01-09 16:39:37 +07:00
19 lines
342 B
Java
19 lines
342 B
Java
class Contracts {
|
|
|
|
boolean x;
|
|
|
|
public boolean testSideEffect() {
|
|
return x && <warning descr="Condition '!(x = false)' is always 'true' when reached">!(x =<caret> false)</warning>;
|
|
}
|
|
|
|
public void testSideEffectInsideCall() {
|
|
if (a()) {
|
|
System.out.println();
|
|
}
|
|
}
|
|
|
|
private boolean a() {
|
|
return x = false;
|
|
}
|
|
|
|
} |