Description
Compound assignment operators (e.g. +=, -=) appear to get parsed as plain assignment operators.
Reproduction
This program:
class A {
public static void main(String[] args) {
int x = 0;
x -= 1;
x += 1;
}
}
in the CSE machine results in x being set to 1 twice instead of -1, then 0 as expected. The final value of x is 1.
Description
Compound assignment operators (e.g.
+=, -=) appear to get parsed as plain assignment operators.Reproduction
This program:
in the CSE machine results in
xbeing set to1twice instead of-1, then0as expected. The final value ofxis1.