Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reduceConditionals should not attempt to reduce variable refs outside of the condition expression #408

Closed
chrispcampbell opened this issue Dec 3, 2023 · 0 comments · Fixed by #409 or #407
Assignees

Comments

@chrispcampbell
Copy link
Contributor

The reduceConditionals function in the new parse package is supposed to only reduce the condition expression (i.e., the first argument) in an IF THEN ELSE call, but the current implementation is incorrect and tries to reduce any variable-ref expression. We should fix this so that variable-ref expressions are returned unmodified, and only in the case of the condition expression should we attempt to resolve/reduce them to a constant (using reduceExpr).

I will include a test with the fix to make it more clear what the issue is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment