-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Evaluation order in LHS struct destructuring #44013
Labels
bug
Indicates an unexpected problem or unintended behavior
compiler:lowering
Syntax lowering (compiler front end, 2nd stage)
Comments
JeffBezanson
added
compiler:lowering
Syntax lowering (compiler front end, 2nd stage)
and removed
parser
Language parsing and surface syntax
labels
Feb 2, 2022
Yes, that is how everything else works:
This is a bug. |
I guess the correct way to say it would be that the rhs should be assigned to an ssavalue first rather than being reused. |
simeonschaub
added a commit
that referenced
this issue
Feb 2, 2022
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this issue
Feb 22, 2022
KristofferC
pushed a commit
that referenced
this issue
Feb 23, 2022
LilithHafner
pushed a commit
to LilithHafner/julia
that referenced
this issue
Mar 8, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
bug
Indicates an unexpected problem or unintended behavior
compiler:lowering
Syntax lowering (compiler front end, 2nd stage)
Consider:
we have:
but
Also in the first case, the overall return is the new value of
f
, but I believe it would be more consistent to return the old value of f. I think the syntax should work in phases, where it collects all the values into ssa values and only then applies the updates.The text was updated successfully, but these errors were encountered: