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: JavaScriptCoreAssignee: 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

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>