Debian Codegraph @

js/src/tests/test262/language/statements/class/elements/nested-equality-init-err-contains-arguments.js

raw
1 // |reftest| error:SyntaxError
2 // This file was procedurally generated from the following sources:
3 // - src/class-elements/init-err-contains-arguments.case
4 // - src/class-elements/initializer-error/cls-decl-fields-equality-nested.template
5 /*---
6 description: Syntax error if `arguments` used in class field (equality expression)
7 esid: sec-class-definitions-static-semantics-early-errors
8 features: [class, class-fields-public]
9 flags: [generated]
10 negative:
11 phase: parse
12 type: SyntaxError
13 info: |
14 Static Semantics: Early Errors
15
16 FieldDefinition:
17 PropertyNameInitializeropt
18
19 - It is a Syntax Error if ContainsArguments of Initializer is true.
20
21 Static Semantics: ContainsArguments
22 IdentifierReference : Identifier
23
24 1. If the StringValue of Identifier is "arguments", return true.
25 ...
26 For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false.
27
28 ---*/
29
30 $DONOTEVALUATE();
31
32 class C {
33 x = () => {} == arguments;
34 }