Skip to content

inconsistent tests for catch parameters #27

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

Open
ascidian opened this issue Oct 24, 2020 · 0 comments
Open

inconsistent tests for catch parameters #27

ascidian opened this issue Oct 24, 2020 · 0 comments

Comments

@ascidian
Copy link

The following two tests should yield the same result. Either both must pass or both must fail.
early/0f5f47108da5c34e.js: try {} catch(a) { for(var a of 1); }
pass/60dcd48a3f6af44f.js: try {} catch(a) { var a = 1; }

According to specification in Annex B.3.5 (https://tc39.es/ecma262/#sec-variablestatements-in-catch-blocks):
It is a Syntax Error if any element of the BoundNames of CatchParameter also occurs in the VarDeclaredNames of Block unless CatchParameter is CatchParameter: BindingIdentifier.

Per this annex both tests must pass.

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

1 participant