Bug 192830 - Annex B.3.5: Var-redeclaration of a catch parameter in a for-of initializer is a syntax error
Summary: Annex B.3.5: Var-redeclaration of a catch parameter in a for-of initializer i...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-18 14:38 PST by Ross Kirsling
Modified: 2019-01-29 15:12 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ross Kirsling 2018-12-18 14:38:40 PST
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
Comment 1 Ross Kirsling 2019-01-07 11:32:41 PST
Update:
I've proposed that we remove this oddity from the spec instead. :D
https://github.com/tc39/ecma262/pull/1393
Comment 2 Ross Kirsling 2019-01-29 14:40:51 PST
The above proposal reached consensus! Closing this ticket as no longer necessary. Will remove the corresponding FIXME.
Comment 3 Ross Kirsling 2019-01-29 15:12:21 PST
Committed r240686: <https://trac.webkit.org/changeset/240686>