Debian Codegraph @

js/src/tests/test262/language/statements/class/class-name-ident-let.js

raw
1 // |reftest| error:SyntaxError
2 // Copyright (C) 2018 André Bargull. All rights reserved.
3 // This code is governed by the BSD license found in the LICENSE file.
4
5 /*---
6 esid: sec-class-definitions
7 description: >
8 `let` is not a valid class-name identifier.
9 info: |
10 12.1.1 Static Semantics: Early Errors
11
12 Identifier : IdentifierName but not ReservedWord
13
14 It is a Syntax Error if this phrase is contained in strict mode code and the
15 StringValue of IdentifierName is: "implements", "interface", "let", "package",
16 "private", "protected", "public", "static", or "yield".
17
18 10.2.1 Strict Mode Code
19
20 All parts of a ClassDeclaration or a ClassExpression are strict mode code.
21 negative:
22 phase: parse
23 type: SyntaxError
24 ---*/
25
26 $DONOTEVALUATE();
27
28 class let {}