archives

« Bugzilla Issues Index

#2193 — 13.2.1.1: Split early error in two early error cases


13.2.1.1 Static Semantics: Early Errors:

> LexicalBinding : BindingIdentifier
> It is a Syntax Error if the BoundNames of BindingIdentifier contains "let".
> It is a Syntax Error if IsConstantDeclaration of the LexicalDeclaration containing this production is true.

The early error description mixes up two different rules, one with and one without the optional Initialiser.

1.
> It is a Syntax Error if IsConstantDeclaration of the LexicalDeclaration containing this production is true.

This early error only applies when there is no Initialiser.

2.
> It is a Syntax Error if the BoundNames of BindingIdentifier contains "let".

Whereas this rule applies independent of the presence of an initialiser.


fixed in rev21 editor's draft


I've just noticed there is a missing restriction for "let" in BindingPatterns, but maybe you've already noticed this when fixing this bug report. That means in addition to "LexicalBinding : BindingIdentifier", "LexicalBinding : BindingPattern" must also not contain "let" in the BoundNames of BindingPattern. Was that issue already fixed in this bug report?


fixed in rev21 draft