wrong translation of x++ operator #46
Copy link
Copy link
Open
Description
Here is another one. I don't know if this comes from ANTLR, or is something that could be solved here.
The Java code:
if (condition):
myArr[count++] = index;
# .. more code here
myArr[count++] = index;is translated to:
__count_1 = count
count += 1
__count_2 = count
count += 1
if condition:
myArr[__count_1] = index;
# .. more code here
myArr[__count_2] = index;It should be translated to:
if condition:
myArr[count] = index;
count += 1
# .. more code here
myArr[count] = index;
count += 1Otherwise the result is not the same if the additional code between both assignments do change the count variable.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Activity