From 0ad5eaf87c50ac7e856e9d99964e4e054f0eeb89 Mon Sep 17 00:00:00 2001 From: Valerie R Young Date: Fri, 20 Oct 2017 19:27:59 -0400 Subject: [PATCH] regenerate tests --- ...ls-direct-eval-err-contains-supercall-1.js | 37 +++++++++++++++++++ ...ls-direct-eval-err-contains-supercall-2.js | 37 +++++++++++++++++++ ...-cls-direct-eval-err-contains-supercall.js | 37 +++++++++++++++++++ ...irect-eval-err-contains-superproperty-1.js | 37 +++++++++++++++++++ ...irect-eval-err-contains-superproperty-2.js | 37 +++++++++++++++++++ ...-indirect-eval-err-contains-supercall-1.js | 37 +++++++++++++++++++ ...-indirect-eval-err-contains-supercall-2.js | 37 +++++++++++++++++++ ...ls-indirect-eval-err-contains-supercall.js | 37 +++++++++++++++++++ ...irect-eval-err-contains-superproperty-1.js | 37 +++++++++++++++++++ ...irect-eval-err-contains-superproperty-2.js | 37 +++++++++++++++++++ ...elds-direct-eval-err-contains-arguments.js | 36 ++++++++++++++++++ ...fields-direct-eval-err-contains-newcall.js | 35 ++++++++++++++++++ ...ds-indirect-eval-err-contains-arguments.js | 36 ++++++++++++++++++ ...elds-indirect-eval-err-contains-newcall.js | 35 ++++++++++++++++++ ...ls-direct-eval-err-contains-supercall-1.js | 37 +++++++++++++++++++ ...ls-direct-eval-err-contains-supercall-2.js | 37 +++++++++++++++++++ ...-cls-direct-eval-err-contains-supercall.js | 37 +++++++++++++++++++ ...irect-eval-err-contains-superproperty-1.js | 37 +++++++++++++++++++ ...irect-eval-err-contains-superproperty-2.js | 37 +++++++++++++++++++ ...-indirect-eval-err-contains-supercall-1.js | 37 +++++++++++++++++++ ...-indirect-eval-err-contains-supercall-2.js | 37 +++++++++++++++++++ ...ls-indirect-eval-err-contains-supercall.js | 37 +++++++++++++++++++ ...irect-eval-err-contains-superproperty-1.js | 37 +++++++++++++++++++ ...irect-eval-err-contains-superproperty-2.js | 37 +++++++++++++++++++ ...elds-direct-eval-err-contains-arguments.js | 36 ++++++++++++++++++ ...fields-direct-eval-err-contains-newcall.js | 35 ++++++++++++++++++ ...ds-indirect-eval-err-contains-arguments.js | 36 ++++++++++++++++++ ...elds-indirect-eval-err-contains-newcall.js | 35 ++++++++++++++++++ 28 files changed, 1024 insertions(+) create mode 100644 test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js create mode 100644 test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js create mode 100644 test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall.js create mode 100644 test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js create mode 100644 test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-2.js create mode 100644 test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js create mode 100644 test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js create mode 100644 test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall.js create mode 100644 test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js create mode 100644 test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-2.js create mode 100644 test/language/expressions/class/fields-direct-eval-err-contains-arguments.js create mode 100644 test/language/expressions/class/fields-direct-eval-err-contains-newcall.js create mode 100644 test/language/expressions/class/fields-indirect-eval-err-contains-arguments.js create mode 100644 test/language/expressions/class/fields-indirect-eval-err-contains-newcall.js create mode 100644 test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js create mode 100644 test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js create mode 100644 test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall.js create mode 100644 test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js create mode 100644 test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-2.js create mode 100644 test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js create mode 100644 test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js create mode 100644 test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall.js create mode 100644 test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js create mode 100644 test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-2.js create mode 100644 test/language/statements/class/fields-direct-eval-err-contains-arguments.js create mode 100644 test/language/statements/class/fields-direct-eval-err-contains-newcall.js create mode 100644 test/language/statements/class/fields-indirect-eval-err-contains-arguments.js create mode 100644 test/language/statements/class/fields-indirect-eval-err-contains-newcall.js diff --git a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js new file mode 100644 index 0000000000..2ac84d65d2 --- /dev/null +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-supercall-1.case +// - src/class-fields/initializer-eval-super/cls-expr-fields-eval.template +/*--- +description: error if `super()` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Constructor Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperCall. + +---*/ + + +A = class {} + +var executed = false; +C = class extends A { + x = eval('executed = true; super();'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js new file mode 100644 index 0000000000..ba1add291b --- /dev/null +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-supercall-2.case +// - src/class-fields/initializer-eval-super/cls-expr-fields-eval.template +/*--- +description: error if `super().x` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperCall. + +---*/ + + +A = class {} + +var executed = false; +C = class extends A { + x = eval('executed = true; super().x;'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall.js new file mode 100644 index 0000000000..4b756296a9 --- /dev/null +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-supercall.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-supercall.case +// - src/class-fields/initializer-eval-super/cls-expr-fields-eval.template +/*--- +description: error if `super()` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Constructor Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperCall. + +---*/ + + +A = class {} + +var executed = false; +C = class extends A { + x = eval('executed = true; super();'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js new file mode 100644 index 0000000000..123a7ecf7b --- /dev/null +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-superproperty-1.case +// - src/class-fields/initializer-eval-super/cls-expr-fields-eval.template +/*--- +description: error if `super().x` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperProperty. + +---*/ + + +A = class {} + +var executed = false; +C = class extends A { + x = eval('executed = true; super.x;'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-2.js b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-2.js new file mode 100644 index 0000000000..7292046b24 --- /dev/null +++ b/test/language/expressions/class/fields-derived-cls-direct-eval-err-contains-superproperty-2.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-superproperty-2.case +// - src/class-fields/initializer-eval-super/cls-expr-fields-eval.template +/*--- +description: error if `super().x` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperProperty. + +---*/ + + +A = class {} + +var executed = false; +C = class extends A { + x = eval('executed = true; super["x"];'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js new file mode 100644 index 0000000000..32f0151329 --- /dev/null +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-supercall-1.case +// - src/class-fields/initializer-eval-super/cls-expr-fields-indirect-eval.template +/*--- +description: error if `super()` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Constructor Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperCall. + +---*/ + + +A = class {} + +var executed = false; +C = class extends A { + x = (0, eval)('executed = true; super();'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js new file mode 100644 index 0000000000..26e1d67029 --- /dev/null +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-supercall-2.case +// - src/class-fields/initializer-eval-super/cls-expr-fields-indirect-eval.template +/*--- +description: error if `super().x` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperCall. + +---*/ + + +A = class {} + +var executed = false; +C = class extends A { + x = (0, eval)('executed = true; super().x;'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall.js new file mode 100644 index 0000000000..b7f6593de5 --- /dev/null +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-supercall.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-supercall.case +// - src/class-fields/initializer-eval-super/cls-expr-fields-indirect-eval.template +/*--- +description: error if `super()` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Constructor Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperCall. + +---*/ + + +A = class {} + +var executed = false; +C = class extends A { + x = (0, eval)('executed = true; super();'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js new file mode 100644 index 0000000000..86e433818e --- /dev/null +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-superproperty-1.case +// - src/class-fields/initializer-eval-super/cls-expr-fields-indirect-eval.template +/*--- +description: error if `super().x` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperProperty. + +---*/ + + +A = class {} + +var executed = false; +C = class extends A { + x = (0, eval)('executed = true; super.x;'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-2.js b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-2.js new file mode 100644 index 0000000000..51c2fdec2a --- /dev/null +++ b/test/language/expressions/class/fields-derived-cls-indirect-eval-err-contains-superproperty-2.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-superproperty-2.case +// - src/class-fields/initializer-eval-super/cls-expr-fields-indirect-eval.template +/*--- +description: error if `super().x` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperProperty. + +---*/ + + +A = class {} + +var executed = false; +C = class extends A { + x = (0, eval)('executed = true; super["x"];'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/expressions/class/fields-direct-eval-err-contains-arguments.js b/test/language/expressions/class/fields-direct-eval-err-contains-arguments.js new file mode 100644 index 0000000000..605db5f141 --- /dev/null +++ b/test/language/expressions/class/fields-direct-eval-err-contains-arguments.js @@ -0,0 +1,36 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-arguments.case +// - src/class-fields/initializer-eval/cls-expr-fields-eval.template +/*--- +description: error if `arguments` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + It is a Syntax Error if ContainsArguments of StatementList is true. + ... + + Static Semantics: ContainsArguments + IdentifierReference : Identifier + + 1. If the StringValue of Identifier is "arguments", return true. + ... + For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. + +---*/ + + +var executed = false; +C = class { + x = eval('executed = true; arguments;'); +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/expressions/class/fields-direct-eval-err-contains-newcall.js b/test/language/expressions/class/fields-direct-eval-err-contains-newcall.js new file mode 100644 index 0000000000..95409dabd8 --- /dev/null +++ b/test/language/expressions/class/fields-direct-eval-err-contains-newcall.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-newcall.case +// - src/class-fields/initializer-eval/cls-expr-fields-eval.template +/*--- +description: error if `new.call` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Functions + These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains NewTarget. + +---*/ + + +var executed = false; +C = class { + x = eval('executed = true; new.call;'); +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/expressions/class/fields-indirect-eval-err-contains-arguments.js b/test/language/expressions/class/fields-indirect-eval-err-contains-arguments.js new file mode 100644 index 0000000000..6840d4d445 --- /dev/null +++ b/test/language/expressions/class/fields-indirect-eval-err-contains-arguments.js @@ -0,0 +1,36 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-arguments.case +// - src/class-fields/initializer-eval/cls-expr-fields-indirect-eval.template +/*--- +description: error if `arguments` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + It is a Syntax Error if ContainsArguments of StatementList is true. + ... + + Static Semantics: ContainsArguments + IdentifierReference : Identifier + + 1. If the StringValue of Identifier is "arguments", return true. + ... + For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. + +---*/ + + +var executed = false; +C = class { + x = (0, eval)('executed = true; arguments;'); +} + +assert.throws(ReferenceError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/expressions/class/fields-indirect-eval-err-contains-newcall.js b/test/language/expressions/class/fields-indirect-eval-err-contains-newcall.js new file mode 100644 index 0000000000..6ed17f4b56 --- /dev/null +++ b/test/language/expressions/class/fields-indirect-eval-err-contains-newcall.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-newcall.case +// - src/class-fields/initializer-eval/cls-expr-fields-indirect-eval.template +/*--- +description: error if `new.call` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Functions + These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains NewTarget. + +---*/ + + +var executed = false; +C = class { + x = (0, eval)('executed = true; new.call;'); +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js new file mode 100644 index 0000000000..b31233318e --- /dev/null +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-1.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-supercall-1.case +// - src/class-fields/initializer-eval-super/cls-decl-fields-eval.template +/*--- +description: error if `super()` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Constructor Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperCall. + +---*/ + + +class A = {} + +var executed = false; +class C extends A = { + x = eval('executed = true; super();'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js new file mode 100644 index 0000000000..b969e3860a --- /dev/null +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall-2.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-supercall-2.case +// - src/class-fields/initializer-eval-super/cls-decl-fields-eval.template +/*--- +description: error if `super().x` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperCall. + +---*/ + + +class A = {} + +var executed = false; +class C extends A = { + x = eval('executed = true; super().x;'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall.js new file mode 100644 index 0000000000..bfd7dce289 --- /dev/null +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-supercall.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-supercall.case +// - src/class-fields/initializer-eval-super/cls-decl-fields-eval.template +/*--- +description: error if `super()` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Constructor Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperCall. + +---*/ + + +class A = {} + +var executed = false; +class C extends A = { + x = eval('executed = true; super();'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js new file mode 100644 index 0000000000..d9b803b3e1 --- /dev/null +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-1.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-superproperty-1.case +// - src/class-fields/initializer-eval-super/cls-decl-fields-eval.template +/*--- +description: error if `super().x` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperProperty. + +---*/ + + +class A = {} + +var executed = false; +class C extends A = { + x = eval('executed = true; super.x;'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-2.js b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-2.js new file mode 100644 index 0000000000..bd0e0509bf --- /dev/null +++ b/test/language/statements/class/fields-derived-cls-direct-eval-err-contains-superproperty-2.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-superproperty-2.case +// - src/class-fields/initializer-eval-super/cls-decl-fields-eval.template +/*--- +description: error if `super().x` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperProperty. + +---*/ + + +class A = {} + +var executed = false; +class C extends A = { + x = eval('executed = true; super["x"];'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js new file mode 100644 index 0000000000..27887d1f03 --- /dev/null +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-1.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-supercall-1.case +// - src/class-fields/initializer-eval-super/cls-decl-fields-indirect-eval.template +/*--- +description: error if `super()` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Constructor Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperCall. + +---*/ + + +class A = {} + +var executed = false; +class C extends A = { + x = (0, eval)('executed = true; super();'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js new file mode 100644 index 0000000000..8e6957dc21 --- /dev/null +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall-2.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-supercall-2.case +// - src/class-fields/initializer-eval-super/cls-decl-fields-indirect-eval.template +/*--- +description: error if `super().x` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperCall. + +---*/ + + +class A = {} + +var executed = false; +class C extends A = { + x = (0, eval)('executed = true; super().x;'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall.js new file mode 100644 index 0000000000..047c0b95c7 --- /dev/null +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-supercall.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-supercall.case +// - src/class-fields/initializer-eval-super/cls-decl-fields-indirect-eval.template +/*--- +description: error if `super()` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Constructor Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of the constructor method of a ClassDeclaration or ClassExpression. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperCall. + +---*/ + + +class A = {} + +var executed = false; +class C extends A = { + x = (0, eval)('executed = true; super();'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js new file mode 100644 index 0000000000..b701e5f70b --- /dev/null +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-1.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-superproperty-1.case +// - src/class-fields/initializer-eval-super/cls-decl-fields-indirect-eval.template +/*--- +description: error if `super().x` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperProperty. + +---*/ + + +class A = {} + +var executed = false; +class C extends A = { + x = (0, eval)('executed = true; super.x;'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-2.js b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-2.js new file mode 100644 index 0000000000..5d35bff3ed --- /dev/null +++ b/test/language/statements/class/fields-derived-cls-indirect-eval-err-contains-superproperty-2.js @@ -0,0 +1,37 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-superproperty-2.case +// - src/class-fields/initializer-eval-super/cls-decl-fields-indirect-eval.template +/*--- +description: error if `super().x` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Methods + These static semantics are applied by PerformEval when a direct eval call occurs outside of a MethodDefinition. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains SuperProperty. + +---*/ + + +class A = {} + +var executed = false; +class C extends A = { + x = (0, eval)('executed = true; super["x"];'; +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/statements/class/fields-direct-eval-err-contains-arguments.js b/test/language/statements/class/fields-direct-eval-err-contains-arguments.js new file mode 100644 index 0000000000..1c231db014 --- /dev/null +++ b/test/language/statements/class/fields-direct-eval-err-contains-arguments.js @@ -0,0 +1,36 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-arguments.case +// - src/class-fields/initializer-eval/cls-decl-fields-eval.template +/*--- +description: error if `arguments` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + It is a Syntax Error if ContainsArguments of StatementList is true. + ... + + Static Semantics: ContainsArguments + IdentifierReference : Identifier + + 1. If the StringValue of Identifier is "arguments", return true. + ... + For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. + +---*/ + + +var executed = false; +class C = { + x = eval('executed = true; arguments;'); +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/statements/class/fields-direct-eval-err-contains-newcall.js b/test/language/statements/class/fields-direct-eval-err-contains-newcall.js new file mode 100644 index 0000000000..ebdac9dfd3 --- /dev/null +++ b/test/language/statements/class/fields-direct-eval-err-contains-newcall.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-newcall.case +// - src/class-fields/initializer-eval/cls-decl-fields-eval.template +/*--- +description: error if `new.call` in StatementList of eval (direct eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Functions + These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains NewTarget. + +---*/ + + +var executed = false; +class C = { + x = eval('executed = true; new.call;'); +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, false); diff --git a/test/language/statements/class/fields-indirect-eval-err-contains-arguments.js b/test/language/statements/class/fields-indirect-eval-err-contains-arguments.js new file mode 100644 index 0000000000..49a0504560 --- /dev/null +++ b/test/language/statements/class/fields-indirect-eval-err-contains-arguments.js @@ -0,0 +1,36 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-arguments.case +// - src/class-fields/initializer-eval/cls-decl-fields-indirect-eval.template +/*--- +description: error if `arguments` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + It is a Syntax Error if ContainsArguments of StatementList is true. + ... + + Static Semantics: ContainsArguments + IdentifierReference : Identifier + + 1. If the StringValue of Identifier is "arguments", return true. + ... + For all other grammatical productions, recurse on all nonterminals. If any piece returns true, then return true. Otherwise return false. + +---*/ + + +var executed = false; +class C = { + x = (0, eval)('executed = true; arguments;'); +} + +assert.throws(ReferenceError, function() { + new C(); +}); + +assert.sameValue(executed, true); diff --git a/test/language/statements/class/fields-indirect-eval-err-contains-newcall.js b/test/language/statements/class/fields-indirect-eval-err-contains-newcall.js new file mode 100644 index 0000000000..af595ddd1a --- /dev/null +++ b/test/language/statements/class/fields-indirect-eval-err-contains-newcall.js @@ -0,0 +1,35 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/eval-err-contains-newcall.case +// - src/class-fields/initializer-eval/cls-decl-fields-indirect-eval.template +/*--- +description: error if `new.call` in StatementList of eval (indirect eval) +esid: sec-performeval-rules-in-initializer +features: [class-fields] +flags: [generated] +info: | + Additional Early Error Rules for Eval Inside Initializer + These static semantics are applied by PerformEval when a direct eval call occurs inside a class field initializer. + ScriptBody : StatementList + + ... + The remaining eval rules apply as outside a constructor, inside a method, and inside a function. + + Additional Early Error Rules for Eval Outside Functions + These static semantics are applied by PerformEval when a direct eval call occurs outside of any function. + ScriptBody:StatementList + + It is a Syntax Error if StatementList Contains NewTarget. + +---*/ + + +var executed = false; +class C = { + x = (0, eval)('executed = true; new.call;'); +} + +assert.throws(SyntaxError, function() { + new C(); +}); + +assert.sameValue(executed, true);