Java control flow: Handle the case where the variable from the left part of a compound assignment is modified in the right part of the same assignment (IDEA-23725)

This commit is contained in:
Pavel Dolgov
2016-07-25 13:36:21 +03:00
parent 3c8cba0ea0
commit 8c2803eedc
2 changed files with 14 additions and 3 deletions
@@ -444,4 +444,12 @@ class AssignInAssert {
if(<error descr="Variable 'a' might not have been initialized">a</error>)
System.out.println();
}
}
class CompoundAssign {
void f() {
int i;
<error descr="Variable 'i' might not have been initialized">i</error> += i = 2;
System.out.println(i);
}
}