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

fix(compiler): Fix compilation of closure scope mutable destructuring #1346

Merged
merged 2 commits into from
Jun 28, 2022

Conversation

ospencer
Copy link
Member

No description provided.

@ospencer ospencer requested a review from a team June 28, 2022 00:40
@ospencer ospencer self-assigned this Jun 28, 2022
run()
|},
"2\n",
);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These tests have me wondering about this:

let run = () => {
        let mut a = 1
        let mut b = 2
        let mut (x, y) = (a, b)
        b = 7
        print(y)
}
run()

What happens?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You get 2!

Copy link
Member

@phated phated Jun 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add that as a test?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

Copy link
Member

@phated phated left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@ospencer ospencer merged commit bdcdb3c into main Jun 28, 2022
@ospencer ospencer deleted the oscar/fix-destructure-mut-bindings branch June 28, 2022 20:20
@github-actions github-actions bot mentioned this pull request Jun 28, 2022
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.

3 participants