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