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

lowered object rest assignment expression returns wrong object #956

Comments

@kzc
Copy link
Contributor

kzc commented Mar 12, 2021

Input:

$ cat rae.js
let v, o = {b: 3, c: 5}, e = ({b: v, ...o} = o);
console.log(JSON.stringify([o !== e, o, e, v]));

Expected result:

$ cat rae.js | node
[true,{"c":5},{"b":3,"c":5},3]

Actual result using b1a394b:

$ cat rae.js | esbuild --target=node14 | node
[false,{"c":5},{"c":5},3]
@evanw
Copy link
Owner

evanw commented Mar 12, 2021

Thanks for the report. I will fix this in the next release.

@evanw evanw closed this as completed in 15745ac Mar 12, 2021
This was referenced Mar 12, 2021
This was referenced Mar 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment