archives

« Bugzilla Issues Index

#3210 — 14.5.1 note banning "let" as class name is unnecessary


10.2.1 says "All parts of a ClassDeclaration or a ClassExpression are strict code."
12.1.1 says that if an identifier is "let" in strict mode then it is a syntax error

By themselves, these two lines ban "class let {}"

However, 14.5.1 goes on to explicitly ban using "let" as the identifier in a class declaration or expression.

We can remove the "let" restriction from 14.5.1, right, since "let" is already forbidden by the implicit strict mode as specified by 10.2.1 and 12.1.1. I would argue that this helps simplify the rules around where and when the pseudo-keyword "let" is allowed, which are somewhat complicated.


fixed in rev28 editor's draft


fixed in rev28