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

UnaryExpression doesn't parenthesize correctly #478

Closed
NotWearingPants opened this issue Mar 3, 2021 · 0 comments · Fixed by #504
Closed

UnaryExpression doesn't parenthesize correctly #478

NotWearingPants opened this issue Mar 3, 2021 · 0 comments · Fixed by #504
Labels

Comments

@NotWearingPants
Copy link

NotWearingPants commented Mar 3, 2021

For some reason this is only a problem with arrow functions, and none of the other NEEDS_PARENTHESES nodes.

Using the online demo:


!(() => {});

turns into

!() => {};

which is a syntax error.


typeof (() => {});

turns into

typeof () => {};

which is a syntax error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants