mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-08-20 02:15:59 +07:00
16 lines
425 B
Java
16 lines
425 B
Java
class Contracts {
|
|
|
|
void test(boolean flag) {
|
|
if (flag == (flag = true)) System.out.println();
|
|
|
|
int x = 1;
|
|
boolean y = x == (x +=1); // returns false
|
|
if (y) System.out.println();
|
|
|
|
int k = 1;
|
|
boolean z = <warning descr="Condition '(k +=1) == k' is always 'true'">(k +=1) == k</warning>; // returns true
|
|
if (<warning descr="Condition 'z' is always 'true'">z</warning>) System.out.println();
|
|
}
|
|
|
|
|
|
} |