We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This code should be a syntax error, but is parsed successfully in OXC. Other parsers like Babel and SWC throw a syntax error as expected.
for (let { x };;);
Interestingly, OXC seems to be able to detect the missing initializer properly when it's outside of the for loop:
// throws: Error: Missing initializer in destructuring declaration let { x }
Babel:
Missing initializer in destructuring declaration. (1:14) > 1 | for (let { x };;); | ^
SWC:
x Destructuring bindings require initializers ,-[input.tsx:1:1] 1 | for (let { x };;); : ^^^^^ `----
The text was updated successfully, but these errors were encountered:
feat(parser): missing initializer in destructuring declaration inside…
0b2ec65
… for loop head closes #8220
2da4365
… for loop head (#8222) closes #8220
Boshen
Successfully merging a pull request may close this issue.
This code should be a syntax error, but is parsed successfully in OXC. Other parsers like Babel and SWC throw a syntax error as expected.
Interestingly, OXC seems to be able to detect the missing initializer properly when it's outside of the for loop:
Babel:
SWC:
The text was updated successfully, but these errors were encountered: