Bug 192830
| Summary: | Annex B.3.5: Var-redeclaration of a catch parameter in a for-of initializer is a syntax error | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Ross Kirsling <ross.kirsling> |
| Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED WONTFIX | ||
| Severity: | Normal | CC: | saam, ysuzuki |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| See Also: | https://bugs.webkit.org/show_bug.cgi?id=192298 | ||
Ross Kirsling
Annex B.3.5 exempts `try {} catch (e) { var e; }` from being a syntax error, but this exemption should not apply if the var declaration is a for-of initializer.
Spec link:
https://tc39.github.io/ecma262/#sec-variablestatements-in-catch-blocks
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Ross Kirsling
Update:
I've proposed that we remove this oddity from the spec instead. :D
https://github.com/tc39/ecma262/pull/1393
Ross Kirsling
The above proposal reached consensus! Closing this ticket as no longer necessary. Will remove the corresponding FIXME.
Ross Kirsling
Committed r240686: <https://trac.webkit.org/changeset/240686>