diff options
Diffstat (limited to 'js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete')
98 files changed, 4180 insertions, 0 deletions
diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/browser.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/browser.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/browser.js diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-get.js new file mode 100644 index 0000000000..048f87ae90 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-get.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-accessor-get.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor get method (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class-fields-public, class, class-fields-private] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete (g().#m); + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-set.js new file mode 100644 index 0000000000..f1e82d4242 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-accessor-set.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-accessor-set.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor set method (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-methods-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete (g().#m); + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async-gen.js new file mode 100644 index 0000000000..c01c57926d --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async-gen.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-async-gen.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async generator (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-iteration, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete (g().#m); + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async.js new file mode 100644 index 0000000000..b1680d7470 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-async.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-async.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async method (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-functions, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete (g().#m); + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-gen.js new file mode 100644 index 0000000000..8bc33c89ba --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method-gen.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-gen.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName generator (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, generators, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete (g().#m); + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method.js new file mode 100644 index 0000000000..792f66b899 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-method.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private ordinary method (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete (g().#m); + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-no-reference.js new file mode 100644 index 0000000000..3a2f9fc0ec --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-private-no-reference.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-no-reference.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName no referencing class element (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete (g().#m); + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-privatename.js new file mode 100644 index 0000000000..adcb626c91 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-call-expression-privatename.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-privatename.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private field (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete (g().#x); + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-get.js new file mode 100644 index 0000000000..d95a5b6e45 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-get.js @@ -0,0 +1,41 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-accessor-get.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor get method (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete (this.#m +); + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-set.js new file mode 100644 index 0000000000..76c28d6d14 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-accessor-set.js @@ -0,0 +1,41 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-accessor-set.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor set method (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete (this.#m +); + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async-gen.js new file mode 100644 index 0000000000..6716eb230d --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async-gen.js @@ -0,0 +1,41 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-async-gen.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async generator (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-iteration, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete (this.#m +); + async *#m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async.js new file mode 100644 index 0000000000..6e0de9f02e --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-async.js @@ -0,0 +1,41 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-async.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async method (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-functions, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete (this.#m +); + async #m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-gen.js new file mode 100644 index 0000000000..34b4efadd9 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method-gen.js @@ -0,0 +1,41 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-gen.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName generator (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, generators, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete (this.#m +); + *#m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method.js new file mode 100644 index 0000000000..2cfddf0c62 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-method.js @@ -0,0 +1,41 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private ordinary method (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete (this.#m +); + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-no-reference.js new file mode 100644 index 0000000000..0b939313b7 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-private-no-reference.js @@ -0,0 +1,40 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-no-reference.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName no referencing class element (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete (this.#m); + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-privatename.js new file mode 100644 index 0000000000..c532a4fa2d --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-covered-err-delete-member-expression-privatename.js @@ -0,0 +1,40 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-privatename.case +// - src/class-elements/delete-error/cls-decl-field-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private field (in field, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete (this.#x); + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-get.js new file mode 100644 index 0000000000..375e2833c8 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-get.js @@ -0,0 +1,39 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-accessor-get.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor get method (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class-fields-public, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete g().#m; + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-set.js new file mode 100644 index 0000000000..b339bee24d --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-accessor-set.js @@ -0,0 +1,39 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-accessor-set.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor set method (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-methods-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete g().#m; + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async-gen.js new file mode 100644 index 0000000000..4d5768d06f --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async-gen.js @@ -0,0 +1,39 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-async-gen.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async generator (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-iteration, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete g().#m; + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async.js new file mode 100644 index 0000000000..65f6b800af --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-async.js @@ -0,0 +1,39 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-async.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async method (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-functions, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete g().#m; + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-gen.js new file mode 100644 index 0000000000..e06dbede59 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method-gen.js @@ -0,0 +1,39 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-gen.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName generator (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, generators, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete g().#m; + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method.js new file mode 100644 index 0000000000..8de8b86e6e --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-method.js @@ -0,0 +1,39 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private ordinary method (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete g().#m; + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-no-reference.js new file mode 100644 index 0000000000..a4b681b2c0 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-private-no-reference.js @@ -0,0 +1,39 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-no-reference.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName no referencing class element (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete g().#m; + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-privatename.js new file mode 100644 index 0000000000..23398a4b22 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-call-expression-privatename.js @@ -0,0 +1,39 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-privatename.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private field (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete g().#x; + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-get.js new file mode 100644 index 0000000000..ff62273759 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-get.js @@ -0,0 +1,38 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-accessor-get.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor get method (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete this.#m +; + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-set.js new file mode 100644 index 0000000000..443d044fe8 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-accessor-set.js @@ -0,0 +1,38 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-accessor-set.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor set method (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete this.#m +; + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async-gen.js new file mode 100644 index 0000000000..957c608694 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async-gen.js @@ -0,0 +1,38 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-async-gen.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async generator (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-iteration, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete this.#m +; + async *#m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async.js new file mode 100644 index 0000000000..9d3045d1fe --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-async.js @@ -0,0 +1,38 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-async.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async method (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-functions, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete this.#m +; + async #m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-gen.js new file mode 100644 index 0000000000..841b0e7a85 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method-gen.js @@ -0,0 +1,38 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-gen.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName generator (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, generators, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete this.#m +; + *#m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method.js new file mode 100644 index 0000000000..75017d0272 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-method.js @@ -0,0 +1,38 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private ordinary method (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete this.#m +; + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-no-reference.js new file mode 100644 index 0000000000..b36c9bfe9d --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-private-no-reference.js @@ -0,0 +1,37 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-no-reference.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName no referencing class element (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete this.#m; + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-privatename.js new file mode 100644 index 0000000000..f2abd8f4df --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-err-delete-member-expression-privatename.js @@ -0,0 +1,37 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-privatename.case +// - src/class-elements/delete-error/cls-decl-field-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private field (in field) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete this.#x; + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js new file mode 100644 index 0000000000..b4cc315b32 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-accessor-get.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor get method (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class-fields-public, class, class-fields-private] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete ((g().#m)); + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js new file mode 100644 index 0000000000..439cc8f1b3 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-accessor-set.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor set method (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-methods-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete ((g().#m)); + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js new file mode 100644 index 0000000000..af61de31e4 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-async-gen.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async generator (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-iteration, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete ((g().#m)); + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async.js new file mode 100644 index 0000000000..793a100152 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-async.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-async.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async method (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-functions, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete ((g().#m)); + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-gen.js new file mode 100644 index 0000000000..221b83ffa4 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method-gen.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-gen.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName generator (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, generators, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete ((g().#m)); + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method.js new file mode 100644 index 0000000000..52f0c2e2bb --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-method.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private ordinary method (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete ((g().#m)); + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-no-reference.js new file mode 100644 index 0000000000..4ef6ac94fa --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-private-no-reference.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-no-reference.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName no referencing class element (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete ((g().#m)); + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-privatename.js new file mode 100644 index 0000000000..5bcb6fb949 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-call-expression-privatename.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-privatename.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private field (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + g = this.f; + x = delete ((g().#x)); + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js new file mode 100644 index 0000000000..eaeb4e0774 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-accessor-get.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor get method (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete ((this.#m +)); + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js new file mode 100644 index 0000000000..4db71f1625 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-accessor-set.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor set method (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete ((this.#m +)); + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js new file mode 100644 index 0000000000..ef92e690b5 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-async-gen.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async generator (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-iteration, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete ((this.#m +)); + + async *#m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async.js new file mode 100644 index 0000000000..22ad4c627c --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-async.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-async.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async method (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-functions, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete ((this.#m +)); + + async #m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-gen.js new file mode 100644 index 0000000000..f2fce899b8 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method-gen.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-gen.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName generator (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, generators, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete ((this.#m +)); + + *#m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method.js new file mode 100644 index 0000000000..eaffab2464 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-method.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private ordinary method (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete ((this.#m +)); + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-no-reference.js new file mode 100644 index 0000000000..a8c4055cb7 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-private-no-reference.js @@ -0,0 +1,41 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-no-reference.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName no referencing class element (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete ((this.#m)); + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-privatename.js new file mode 100644 index 0000000000..e8279b2f45 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/field-delete-twice-covered-err-delete-member-expression-privatename.js @@ -0,0 +1,41 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-privatename.case +// - src/class-elements/delete-error/cls-decl-field-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private field (in field, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-fields-public] +flags: [generated] +negative: + phase: parse + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x = delete ((this.#x)); + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-get.js new file mode 100644 index 0000000000..2c5e260919 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-get.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-accessor-get.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor get method (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class-fields-public, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete (g().#m); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-set.js new file mode 100644 index 0000000000..851b778f9e --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-accessor-set.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-accessor-set.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor set method (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-methods-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete (g().#m); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async-gen.js new file mode 100644 index 0000000000..8c8f1c8757 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async-gen.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-async-gen.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async generator (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-iteration, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete (g().#m); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async.js new file mode 100644 index 0000000000..cb2f115354 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-async.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-async.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async method (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-functions, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete (g().#m); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-gen.js new file mode 100644 index 0000000000..a43392bdfa --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method-gen.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-gen.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName generator (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, generators, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete (g().#m); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method.js new file mode 100644 index 0000000000..e72c2385fc --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-method.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private ordinary method (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete (g().#m); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-no-reference.js new file mode 100644 index 0000000000..6d0fba7c35 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-private-no-reference.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-no-reference.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName no referencing class element (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete (g().#m); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-privatename.js new file mode 100644 index 0000000000..be6e92d1f8 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-call-expression-privatename.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-privatename.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private field (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete (g().#x); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-get.js new file mode 100644 index 0000000000..64dc052956 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-get.js @@ -0,0 +1,48 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-accessor-get.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor get method (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete (this.#m +); + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-set.js new file mode 100644 index 0000000000..d9459ce491 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-accessor-set.js @@ -0,0 +1,48 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-accessor-set.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor set method (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete (this.#m +); + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async-gen.js new file mode 100644 index 0000000000..21a539de83 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async-gen.js @@ -0,0 +1,48 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-async-gen.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async generator (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-iteration, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete (this.#m +); + } + + async *#m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async.js new file mode 100644 index 0000000000..a5094182f6 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-async.js @@ -0,0 +1,48 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-async.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async method (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-functions, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete (this.#m +); + } + + async #m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-gen.js new file mode 100644 index 0000000000..9b60741fed --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method-gen.js @@ -0,0 +1,48 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-gen.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName generator (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, generators, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete (this.#m +); + } + + *#m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method.js new file mode 100644 index 0000000000..dcb09ae291 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-method.js @@ -0,0 +1,48 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private ordinary method (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete (this.#m +); + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-no-reference.js new file mode 100644 index 0000000000..ef2bbcd031 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-private-no-reference.js @@ -0,0 +1,47 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-no-reference.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName no referencing class element (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete (this.#m); + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-privatename.js new file mode 100644 index 0000000000..07c1c079c6 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-covered-err-delete-member-expression-privatename.js @@ -0,0 +1,47 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-privatename.case +// - src/class-elements/delete-error/cls-decl-method-delete-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private field (in method, covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete (this.#x); + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-get.js new file mode 100644 index 0000000000..53d75c453b --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-get.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-accessor-get.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor get method (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class-fields-public, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete g().#m; + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-set.js new file mode 100644 index 0000000000..6f2aa7fd92 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-accessor-set.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-accessor-set.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor set method (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-methods-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete g().#m; + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async-gen.js new file mode 100644 index 0000000000..7e393a5f54 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async-gen.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-async-gen.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async generator (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-iteration, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete g().#m; + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async.js new file mode 100644 index 0000000000..d9e120e502 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-async.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-async.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async method (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-functions, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete g().#m; + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-gen.js new file mode 100644 index 0000000000..93c7464d97 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method-gen.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-gen.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName generator (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, generators, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete g().#m; + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method.js new file mode 100644 index 0000000000..c42ec89007 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-method.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private ordinary method (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete g().#m; + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-no-reference.js new file mode 100644 index 0000000000..195ace594a --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-private-no-reference.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-no-reference.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName no referencing class element (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete g().#m; + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-privatename.js new file mode 100644 index 0000000000..3b157abf71 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-call-expression-privatename.js @@ -0,0 +1,43 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-privatename.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private field (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete g().#x; + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-get.js new file mode 100644 index 0000000000..145d32372d --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-get.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-accessor-get.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor get method (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete this.#m +; + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-set.js new file mode 100644 index 0000000000..478d90b58e --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-accessor-set.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-accessor-set.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor set method (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete this.#m +; + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async-gen.js new file mode 100644 index 0000000000..ed9a763511 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async-gen.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-async-gen.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async generator (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-iteration, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete this.#m +; + } + + async *#m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async.js new file mode 100644 index 0000000000..235ef7cafe --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-async.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-async.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async method (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-functions, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete this.#m +; + } + + async #m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-gen.js new file mode 100644 index 0000000000..2fef15be78 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method-gen.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-gen.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName generator (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, generators, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete this.#m +; + } + + *#m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method.js new file mode 100644 index 0000000000..baf9e90077 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-method.js @@ -0,0 +1,42 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private ordinary method (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete this.#m +; + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-no-reference.js new file mode 100644 index 0000000000..eb8974ebbd --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-private-no-reference.js @@ -0,0 +1,41 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-no-reference.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName no referencing class element (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete this.#m; + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-privatename.js new file mode 100644 index 0000000000..452281c26f --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-err-delete-member-expression-privatename.js @@ -0,0 +1,41 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-privatename.case +// - src/class-elements/delete-error/cls-decl-method-delete.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private field (in method) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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 . + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete this.#x; + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js new file mode 100644 index 0000000000..92d223ff91 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-get.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-accessor-get.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor get method (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class-fields-public, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete ((g().#m)); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js new file mode 100644 index 0000000000..8ff0ddbe26 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-accessor-set.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-accessor-set.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName accessor set method (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private, class-methods-private, class-fields-public] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete ((g().#m)); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js new file mode 100644 index 0000000000..3416671362 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async-gen.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-async-gen.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async generator (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-iteration, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete ((g().#m)); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async.js new file mode 100644 index 0000000000..159cc68a91 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-async.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-async.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName async method (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-functions, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete ((g().#m)); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-gen.js new file mode 100644 index 0000000000..7b67503b9c --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method-gen.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method-gen.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName generator (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, generators, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete ((g().#m)); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method.js new file mode 100644 index 0000000000..e42ca69e69 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-method.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-method.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private ordinary method (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete ((g().#m)); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-no-reference.js new file mode 100644 index 0000000000..894e6dec11 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-private-no-reference.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-private-no-reference.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName no referencing class element (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete ((g().#m)); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-privatename.js new file mode 100644 index 0000000000..3369ed7036 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-call-expression-privatename.js @@ -0,0 +1,49 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-call-expression-privatename.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to CallExpression.PrivateName private field (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + var g = this.f; + delete ((g().#x)); + } + + f() { + return this; + } +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js new file mode 100644 index 0000000000..f2d177b212 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-get.js @@ -0,0 +1,48 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-accessor-get.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor get method (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete ((this.#m +)); + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js new file mode 100644 index 0000000000..5dc1a2ce6b --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-accessor-set.js @@ -0,0 +1,48 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-accessor-set.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName accessor set method (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete ((this.#m +)); + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js new file mode 100644 index 0000000000..587b65efaa --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async-gen.js @@ -0,0 +1,48 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-async-gen.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async generator (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-iteration, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete ((this.#m +)); + } + + async *#m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async.js new file mode 100644 index 0000000000..f76f8015b9 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-async.js @@ -0,0 +1,48 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-async.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName async method (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, async-functions, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete ((this.#m +)); + } + + async #m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-gen.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-gen.js new file mode 100644 index 0000000000..573901042b --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method-gen.js @@ -0,0 +1,48 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method-gen.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName generator (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, generators, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete ((this.#m +)); + } + + *#m() {} +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method.js new file mode 100644 index 0000000000..e5467a13e3 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-method.js @@ -0,0 +1,48 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-method.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private ordinary method (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-methods-private, class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete ((this.#m +)); + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-no-reference.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-no-reference.js new file mode 100644 index 0000000000..568d177eaf --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-private-no-reference.js @@ -0,0 +1,47 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-private-no-reference.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName no referencing class element (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete ((this.#m)); + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-privatename.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-privatename.js new file mode 100644 index 0000000000..60ba271d21 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/method-delete-twice-covered-err-delete-member-expression-privatename.js @@ -0,0 +1,47 @@ +// |reftest| error:SyntaxError +// This file was procedurally generated from the following sources: +// - src/class-elements/err-delete-member-expression-privatename.case +// - src/class-elements/delete-error/cls-decl-method-delete-twice-covered.template +/*--- +description: It's a SyntaxError if delete operator is applied to MemberExpression.PrivateName private field (in method, recursively covered) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-private] +flags: [generated] +negative: + phase: parse + type: SyntaxError +info: | + This file must never use the onlyStrict flag as the strict mode should always + be observed inside class bodies. + + 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. + +---*/ + + +$DONOTEVALUATE(); + +class C { + #x; + + x() { + + delete ((this.#x)); + } + + +} diff --git a/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/shell.js b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/shell.js new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/js/src/tests/test262/language/statements/class/elements/syntax/early-errors/delete/shell.js |