mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 06:05:01 +07:00
IDEA-151355 Wrong 'condition always false' after using decrement on object field
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
class Test {
|
||||
public class Node{
|
||||
private int var;
|
||||
}
|
||||
public void foo(Node n){
|
||||
assert(n.var>0);
|
||||
n.var--;
|
||||
if(n.var==0) { // condition always false
|
||||
System.out.println();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user