Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/language/expressions/class/err-method-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-method-delete-covered.template
4 /*---
5 description: Syntax error if you call delete on call expressions . privatename (in method, 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
29 x() {
30 var g = this.f;
31 delete (g().#x);
32 }
33
34 f() {
35 return this;
36 }
37 }