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

SyntaxError from const { default: greeting } = { default: 1 } #565

Closed
dckc opened this issue Feb 18, 2021 · 4 comments
Closed

SyntaxError from const { default: greeting } = { default: 1 } #565

dckc opened this issue Feb 18, 2021 · 4 comments

Comments

@dckc
Copy link
Contributor

dckc commented Feb 18, 2021

xst reports this as a syntax error:

const { default: greeting } = { default: 1 }

Steps to Reproduce

xst -e 'try { const { default: greeting } = { default: 1 }; print(1) } catch (e) { print(e.message)}'
SyntaxError: missing identifier

Expected behavior

not a syntax error.

Build environment:

v 4e7225e on linux

Other information

context: https://github.com/Agoric/SES-shim/blob/master/packages/ses/test/test-compartment-transforms.js#L88
endojs/endo#508

cc @erights @warner

@dckc
Copy link
Contributor Author

dckc commented Feb 22, 2021

just ran into another case of this, I think:

const { in: stuff } = { in: 1 };

My linux build of xst hangs given that input. Odd.

context:

https://github.com/Agoric/agoric-sdk/blob/master/packages/zoe/test/autoswapJig.js#L160

Agoric/agoric-sdk#2486

cc @Chris-Hibbert

@dckc
Copy link
Contributor Author

dckc commented Feb 26, 2021

@phoddie any thoughts on this one?

@phoddie
Copy link
Collaborator

phoddie commented Feb 26, 2021

Yes, we have a fix. We'll get that in our next SDK push.

@dckc
Copy link
Contributor Author

dckc commented Mar 2, 2021

fix confirmed

@dckc dckc closed this as completed Mar 2, 2021
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

No branches or pull requests

2 participants