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

async should be usable as an object key #131

Open
cdepillabout opened this issue Nov 8, 2021 · 1 comment
Open

async should be usable as an object key #131

cdepillabout opened this issue Nov 8, 2021 · 1 comment

Comments

@cdepillabout
Copy link

cdepillabout commented Nov 8, 2021

There was a bug reported when trying to use language-javascript-0.7.1.0 in PureScript: purescript/purescript#4199 (comment)

It appears that async is completely treated as a keyword, and not allowed as an object key. So something like myObj.async doesn't parse. But apparently this is allowed in JS.

This was probably introduced in #113.

(I'm not super familiar with language-javascript, or even JS, but maybe @MonoidMusician, @garyb, or @JordanMartinez could follow-up on this if @erikd needs more information or I've reported this incorrectly.)

@rhendric
Copy link
Contributor

rhendric commented Nov 9, 2021

I think myObj.async expressions parse correctly, as do { async: 0 } expressions and similar. I believe the issue that PureScript encountered was actually with a function (async) { ... } expression; I tested and encountered problems with that and with similar constructions using arrow syntax.

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