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

Desugaring fixes #1369

Merged
merged 6 commits into from
Sep 1, 2023
Merged

Desugaring fixes #1369

merged 6 commits into from
Sep 1, 2023

Conversation

eregon
Copy link
Member

@eregon eregon commented Aug 30, 2023

Some nodes were incorrectly desugared, with some location field and the value nodes being swapped.
This is fixed by making the ordering consistent in this PR.
If that's not desired, an alternative would be to provide lambdas to helpers like desugar_or_write_node to get the correct order (that can also be done in addition to making the order consistent).

@eregon eregon requested a review from kddnewton August 30, 2023 20:58
eregon added 5 commits August 30, 2023 23:00
* Consistent with ClassVariableWriteNode, ConstantWriteNode, InstanceVariableWriteNode, LocalVariableWriteNode.
* Fixes desugaring of global variable with operators.
* Consistent with ClassVariableWriteNode, ConstantWriteNode, InstanceVariableWriteNode, GlobalVariableWriteNode.
* Fixes desugaring of local variable with operators.
test/yarp/desugar_visitor_test.rb Outdated Show resolved Hide resolved
@eregon eregon requested a review from kddnewton August 31, 2023 12:55
@kddnewton kddnewton merged commit fc88558 into ruby:main Sep 1, 2023
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants