Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/class/err-field-delete-covered-call-expression-privatename.js

raw
1 // This file was procedurally generated from the following sources:
2 // - src/class-fields/call-expression-privatename.case
3 // - src/class-fields/delete-error/cls-expr-field-delete-covered.template
4 /*---
5 description: Syntax error if you call delete on call expressions . privatename (in field, covered)
6 esid: sec-class-definitions-static-semantics-early-errors
7 features: [class, class-fields-private, class-fields-public]
8 flags: [generated]
9 negative:
10 phase: parse
11 type: SyntaxError
12 info: |
13 Static Semantics: Early Errors
14
15 UnaryExpression : delete UnaryExpression
16
17 It is a Syntax Error if the UnaryExpression is contained in strict mode code and the derived UnaryExpression is PrimaryExpression : IdentifierReference , MemberExpression : MemberExpression.PrivateName , or CallExpression : CallExpression.PrivateName .
18
19 It is a Syntax Error if the derived UnaryExpression is PrimaryExpression : CoverParenthesizedExpressionAndArrowParameterList and CoverParenthesizedExpressionAndArrowParameterList ultimately derives a phrase that, if used in place of UnaryExpression, would produce a Syntax Error according to these rules. This rule is recursively applied.
20
21 ---*/
22
23
24 throw "Test262: This statement should not be evaluated.";
25
26 var C = class {
27 #x;
28 g = this.f;
29 x = delete (g().#x);
30
31 f() {
32 return this;
33 }
34 }