diff --git a/test/language/expressions/class/err-field-delete-call-expression-privatename.js b/test/language/expressions/class/err-field-delete-call-expression-privatename.js new file mode 100644 index 0000000000..5941f1b87f --- /dev/null +++ b/test/language/expressions/class/err-field-delete-call-expression-privatename.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/call-expression-privatename.case +// - src/class-fields/delete-error/cls-expr-field-delete.template +/*--- +description: Syntax error if you call delete on call expressions . privatename (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + g = this.f; + x = delete g().#x; + + f() { + return this; + } +} diff --git a/test/language/expressions/class/err-field-delete-covered-call-expression-privatename.js b/test/language/expressions/class/err-field-delete-covered-call-expression-privatename.js new file mode 100644 index 0000000000..2709caa814 --- /dev/null +++ b/test/language/expressions/class/err-field-delete-covered-call-expression-privatename.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/call-expression-privatename.case +// - src/class-fields/delete-error/cls-expr-field-delete-covered.template +/*--- +description: Syntax error if you call delete on call expressions . privatename (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + g = this.f; + x = delete (g().#x); + + f() { + return this; + } +} diff --git a/test/language/expressions/class/err-field-delete-covered-member-expression-privatename.js b/test/language/expressions/class/err-field-delete-covered-member-expression-privatename.js new file mode 100644 index 0000000000..84e557e622 --- /dev/null +++ b/test/language/expressions/class/err-field-delete-covered-member-expression-privatename.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/member-expression-privatename.case +// - src/class-fields/delete-error/cls-expr-field-delete-covered.template +/*--- +description: Syntax error if you call delete on member expressions . privatename (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + + x = delete (this.#x); + + +} diff --git a/test/language/expressions/class/err-field-delete-member-expression-privatename.js b/test/language/expressions/class/err-field-delete-member-expression-privatename.js new file mode 100644 index 0000000000..6e8381e221 --- /dev/null +++ b/test/language/expressions/class/err-field-delete-member-expression-privatename.js @@ -0,0 +1,30 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/member-expression-privatename.case +// - src/class-fields/delete-error/cls-expr-field-delete.template +/*--- +description: Syntax error if you call delete on member expressions . privatename (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + + x = delete this.#x; + + +} diff --git a/test/language/expressions/class/err-field-delete-twice-covered-call-expression-privatename.js b/test/language/expressions/class/err-field-delete-twice-covered-call-expression-privatename.js new file mode 100644 index 0000000000..ccc0f4f172 --- /dev/null +++ b/test/language/expressions/class/err-field-delete-twice-covered-call-expression-privatename.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/call-expression-privatename.case +// - src/class-fields/delete-error/cls-expr-field-delete-twice-covered.template +/*--- +description: Syntax error if you call delete on call expressions . privatename (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + g = this.f; + x = delete ((g().#x)); + + f() { + return this; + } +} diff --git a/test/language/expressions/class/err-field-delete-twice-covered-member-expression-privatename.js b/test/language/expressions/class/err-field-delete-twice-covered-member-expression-privatename.js new file mode 100644 index 0000000000..c170745c4f --- /dev/null +++ b/test/language/expressions/class/err-field-delete-twice-covered-member-expression-privatename.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/member-expression-privatename.case +// - src/class-fields/delete-error/cls-expr-field-delete-twice-covered.template +/*--- +description: Syntax error if you call delete on member expressions . privatename (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + + x = delete ((this.#x)); + + +} diff --git a/test/language/expressions/class/err-method-delete-call-expression-privatename.js b/test/language/expressions/class/err-method-delete-call-expression-privatename.js new file mode 100644 index 0000000000..ad7390815c --- /dev/null +++ b/test/language/expressions/class/err-method-delete-call-expression-privatename.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/call-expression-privatename.case +// - src/class-fields/delete-error/cls-expr-method-delete.template +/*--- +description: Syntax error if you call delete on call expressions . privatename (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + + x() { + var g = this.f; + delete g().#x; + } + + f() { + return this; + } +} diff --git a/test/language/expressions/class/err-method-delete-covered-call-expression-privatename.js b/test/language/expressions/class/err-method-delete-covered-call-expression-privatename.js new file mode 100644 index 0000000000..3b85fdf5f4 --- /dev/null +++ b/test/language/expressions/class/err-method-delete-covered-call-expression-privatename.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/call-expression-privatename.case +// - src/class-fields/delete-error/cls-expr-method-delete-covered.template +/*--- +description: Syntax error if you call delete on call expressions . privatename (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + + x() { + var g = this.f; + delete (g().#x); + } + + f() { + return this; + } +} diff --git a/test/language/expressions/class/err-method-delete-covered-member-expression-privatename.js b/test/language/expressions/class/err-method-delete-covered-member-expression-privatename.js new file mode 100644 index 0000000000..ae0ef4619c --- /dev/null +++ b/test/language/expressions/class/err-method-delete-covered-member-expression-privatename.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/member-expression-privatename.case +// - src/class-fields/delete-error/cls-expr-method-delete-covered.template +/*--- +description: Syntax error if you call delete on member expressions . privatename (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + + x() { + + delete (this.#x); + } + + +} diff --git a/test/language/expressions/class/err-method-delete-member-expression-privatename.js b/test/language/expressions/class/err-method-delete-member-expression-privatename.js new file mode 100644 index 0000000000..5ac00be882 --- /dev/null +++ b/test/language/expressions/class/err-method-delete-member-expression-privatename.js @@ -0,0 +1,33 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/member-expression-privatename.case +// - src/class-fields/delete-error/cls-expr-method-delete.template +/*--- +description: Syntax error if you call delete on member expressions . privatename (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + + x() { + + delete this.#x; + } + + +} diff --git a/test/language/expressions/class/err-method-delete-twice-covered-call-expression-privatename.js b/test/language/expressions/class/err-method-delete-twice-covered-call-expression-privatename.js new file mode 100644 index 0000000000..02aa7e63dc --- /dev/null +++ b/test/language/expressions/class/err-method-delete-twice-covered-call-expression-privatename.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/call-expression-privatename.case +// - src/class-fields/delete-error/cls-expr-method-delete-twice-covered.template +/*--- +description: Syntax error if you call delete on call expressions . privatename (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + + x() { + var g = this.f; + delete ((g().#x)); + } + + f() { + return this; + } +} diff --git a/test/language/expressions/class/err-method-delete-twice-covered-member-expression-privatename.js b/test/language/expressions/class/err-method-delete-twice-covered-member-expression-privatename.js new file mode 100644 index 0000000000..6ca6f29abe --- /dev/null +++ b/test/language/expressions/class/err-method-delete-twice-covered-member-expression-privatename.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/member-expression-privatename.case +// - src/class-fields/delete-error/cls-expr-method-delete-twice-covered.template +/*--- +description: Syntax error if you call delete on member expressions . privatename (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + #x; + + x() { + + delete ((this.#x)); + } + + +} diff --git a/test/language/statements/class/err-field-delete-call-expression-privatename.js b/test/language/statements/class/err-field-delete-call-expression-privatename.js new file mode 100644 index 0000000000..359c1a7559 --- /dev/null +++ b/test/language/statements/class/err-field-delete-call-expression-privatename.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/call-expression-privatename.case +// - src/class-fields/delete-error/cls-decl-field-delete.template +/*--- +description: Syntax error if you call delete on call expressions . privatename (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + g = this.f; + x = delete g().#x; + f() { + return this; + } +} diff --git a/test/language/statements/class/err-field-delete-covered-call-expression-privatename.js b/test/language/statements/class/err-field-delete-covered-call-expression-privatename.js new file mode 100644 index 0000000000..21afe2958c --- /dev/null +++ b/test/language/statements/class/err-field-delete-covered-call-expression-privatename.js @@ -0,0 +1,33 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/call-expression-privatename.case +// - src/class-fields/delete-error/cls-decl-field-delete-covered.template +/*--- +description: Syntax error if you call delete on call expressions . privatename (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + g = this.f; + x = delete (g().#x); + f() { + return this; + } +} diff --git a/test/language/statements/class/err-field-delete-covered-member-expression-privatename.js b/test/language/statements/class/err-field-delete-covered-member-expression-privatename.js new file mode 100644 index 0000000000..d1042e1a42 --- /dev/null +++ b/test/language/statements/class/err-field-delete-covered-member-expression-privatename.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/member-expression-privatename.case +// - src/class-fields/delete-error/cls-decl-field-delete-covered.template +/*--- +description: Syntax error if you call delete on member expressions . privatename (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + + x = delete (this.#x); + +} diff --git a/test/language/statements/class/err-field-delete-member-expression-privatename.js b/test/language/statements/class/err-field-delete-member-expression-privatename.js new file mode 100644 index 0000000000..57dea8b7ab --- /dev/null +++ b/test/language/statements/class/err-field-delete-member-expression-privatename.js @@ -0,0 +1,29 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/member-expression-privatename.case +// - src/class-fields/delete-error/cls-decl-field-delete.template +/*--- +description: Syntax error if you call delete on member expressions . privatename (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + + x = delete this.#x; + +} diff --git a/test/language/statements/class/err-field-delete-twice-covered-call-expression-privatename.js b/test/language/statements/class/err-field-delete-twice-covered-call-expression-privatename.js new file mode 100644 index 0000000000..f142c19703 --- /dev/null +++ b/test/language/statements/class/err-field-delete-twice-covered-call-expression-privatename.js @@ -0,0 +1,34 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/call-expression-privatename.case +// - src/class-fields/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: Syntax error if you call delete on call expressions . privatename (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + g = this.f; + x = delete ((g().#x)); + + f() { + return this; + } +} diff --git a/test/language/statements/class/err-field-delete-twice-covered-member-expression-privatename.js b/test/language/statements/class/err-field-delete-twice-covered-member-expression-privatename.js new file mode 100644 index 0000000000..41fea77b43 --- /dev/null +++ b/test/language/statements/class/err-field-delete-twice-covered-member-expression-privatename.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/member-expression-privatename.case +// - src/class-fields/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: Syntax error if you call delete on member expressions . privatename (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + + x = delete ((this.#x)); + + +} diff --git a/test/language/statements/class/err-method-delete-call-expression-privatename.js b/test/language/statements/class/err-method-delete-call-expression-privatename.js new file mode 100644 index 0000000000..f55917d582 --- /dev/null +++ b/test/language/statements/class/err-method-delete-call-expression-privatename.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/call-expression-privatename.case +// - src/class-fields/delete-error/cls-decl-method-delete.template +/*--- +description: Syntax error if you call delete on call expressions . privatename (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + + x() { + var g = this.f; + delete g().#x; + } + + f() { + return this; + } +} diff --git a/test/language/statements/class/err-method-delete-covered-call-expression-privatename.js b/test/language/statements/class/err-method-delete-covered-call-expression-privatename.js new file mode 100644 index 0000000000..b6e14a0c6b --- /dev/null +++ b/test/language/statements/class/err-method-delete-covered-call-expression-privatename.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/call-expression-privatename.case +// - src/class-fields/delete-error/cls-decl-method-delete-covered.template +/*--- +description: Syntax error if you call delete on call expressions . privatename (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + + x() { + var g = this.f; + delete (g().#x); + } + + f() { + return this; + } +} diff --git a/test/language/statements/class/err-method-delete-covered-member-expression-privatename.js b/test/language/statements/class/err-method-delete-covered-member-expression-privatename.js new file mode 100644 index 0000000000..71fc2c51f9 --- /dev/null +++ b/test/language/statements/class/err-method-delete-covered-member-expression-privatename.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/member-expression-privatename.case +// - src/class-fields/delete-error/cls-decl-method-delete-covered.template +/*--- +description: Syntax error if you call delete on member expressions . privatename (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + + x() { + + delete (this.#x); + } + + +} diff --git a/test/language/statements/class/err-method-delete-member-expression-privatename.js b/test/language/statements/class/err-method-delete-member-expression-privatename.js new file mode 100644 index 0000000000..492410f3cf --- /dev/null +++ b/test/language/statements/class/err-method-delete-member-expression-privatename.js @@ -0,0 +1,33 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/member-expression-privatename.case +// - src/class-fields/delete-error/cls-decl-method-delete.template +/*--- +description: Syntax error if you call delete on member expressions . privatename (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + + x() { + + delete this.#x; + } + + +} diff --git a/test/language/statements/class/err-method-delete-twice-covered-call-expression-privatename.js b/test/language/statements/class/err-method-delete-twice-covered-call-expression-privatename.js new file mode 100644 index 0000000000..9781eb9a59 --- /dev/null +++ b/test/language/statements/class/err-method-delete-twice-covered-call-expression-privatename.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/call-expression-privatename.case +// - src/class-fields/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: Syntax error if you call delete on call expressions . privatename (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + + x() { + var g = this.f; + delete ((g().#x)); + } + + f() { + return this; + } +} diff --git a/test/language/statements/class/err-method-delete-twice-covered-member-expression-privatename.js b/test/language/statements/class/err-method-delete-twice-covered-member-expression-privatename.js new file mode 100644 index 0000000000..fdc6b8c270 --- /dev/null +++ b/test/language/statements/class/err-method-delete-twice-covered-member-expression-privatename.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/member-expression-privatename.case +// - src/class-fields/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: Syntax error if you call delete on member expressions . privatename (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: Early Errors + + UnaryExpression : delete UnaryExpression + + 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 . + + 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. + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + #x; + + x() { + + delete ((this.#x)); + } + + +}