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

await inside class property definition value should fail #1334

Closed
CanadaHonk opened this issue Dec 14, 2024 · 1 comment
Closed

await inside class property definition value should fail #1334

CanadaHonk opened this issue Dec 14, 2024 · 1 comment

Comments

@CanadaHonk
Copy link

async () => class { x = await 1 };

The above should fail to parse but does not, I think the title is a correct diagnosis. @babel/parser, Node's REPL and Deno's REPL all fail to parse as expected.

@marijnh
Copy link
Member

marijnh commented Dec 14, 2024

Attached patch should help with this.

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