I found an issue with the IF THEN ELSE optimization that was implemented for #102. When the optimization is applied, the code gen failed to preserve the parentheses, which are sometimes critical.
Example that demonstrates the problem:
constant = 1 ~~|
a = IF THEN ELSE(constant, b + c, d - e) * 10 ~~|
In this case, SDE currently generates incorrect code:
It should instead preserve the parentheses:
I found an issue with the
IF THEN ELSEoptimization that was implemented for #102. When the optimization is applied, the code gen failed to preserve the parentheses, which are sometimes critical.Example that demonstrates the problem:
In this case, SDE currently generates incorrect code:
It should instead preserve the parentheses: