Definite un-assignedness for assignment expression
Issue #51
resolved
JLS version 7, Chapter 16.1.8 states:
V is definitely unassigned after the assignment expression iff a is not V and V is definitely unassigned after b.
The attribute for assignment expression definite unassignedness does not comply with the specification:
eq AssignExpr.isDUafter(Variable v) = getSource().isDUafter(v);
The attribute only checks the source unassignedness.
Proposed fix:
eq AssignExpr.isDUafter(Variable v) { //Bug in java 4 implementation, see 16.1.8 second bullet. Must check that v != a if(getDest().isVariable() && getDest().varDecl() == v) return false; else return getSource().isDUafter(v); }
Comments (2)
-
-
- changed status to resolved
- Log in to comment
Test case for this bug: