diff --git a/test/language/expressions/class/fields-computed-name-propname-constructor.js b/test/language/expressions/class/fields-computed-name-propname-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..0ea94af6ab515d70e735a77e21e7ad1d29483d14 --- /dev/null +++ b/test/language/expressions/class/fields-computed-name-propname-constructor.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/propname-constructor.case +// - src/class-fields/propname-error/cls-expr-computed-name.template +/*--- +description: Static class fields cannot have PropName 'constructor' (computed) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +info: | + Static Semantics: PropName + ... + ComputedPropertyName : [ AssignmentExpression ] + Return empty. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : FieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "constructor". + +---*/ + + +var x = "constructor"; +var C = class { + [x]; +} + +var c = new C(); + +assert.sameValue(c.hasOwnProperty("constructor"), true); diff --git a/test/language/expressions/class/fields-computed-name-static-propname-constructor.js b/test/language/expressions/class/fields-computed-name-static-propname-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..96c4830c6cd23b61abfc3680fa23e965c3f7cf32 --- /dev/null +++ b/test/language/expressions/class/fields-computed-name-static-propname-constructor.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/static-propname-constructor.case +// - src/class-fields/propname-error/cls-expr-computed-name.template +/*--- +description: Static class field cannot have PropName 'constructor' (computed) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +info: | + Static Semantics: PropName + ... + ComputedPropertyName : [ AssignmentExpression ] + Return empty. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : staticFieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +---*/ + + +var x = "constructor"; +var C = class { + static [x]; +} + +var c = new C(); + +assert.sameValue(c.hasOwnProperty("constructor"), true); diff --git a/test/language/expressions/class/fields-computed-name-static-propname-prototype.js b/test/language/expressions/class/fields-computed-name-static-propname-prototype.js new file mode 100644 index 0000000000000000000000000000000000000000..d1a3c6ef983726d36752fd43698721d23fdefd8f --- /dev/null +++ b/test/language/expressions/class/fields-computed-name-static-propname-prototype.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/static-propname-prototype.case +// - src/class-fields/propname-error/cls-expr-computed-name.template +/*--- +description: Static class fields cannot have PropName 'prototype' (computed) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +info: | + Static Semantics: PropName + ... + ComputedPropertyName : [ AssignmentExpression ] + Return empty. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : staticFieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +---*/ + + +var x = "prototype"; +var C = class { + static [x]; +} + +var c = new C(); + +assert.sameValue(c.hasOwnProperty("prototype"), true); diff --git a/test/language/expressions/class/fields-literal-name-propname-constructor.js b/test/language/expressions/class/fields-literal-name-propname-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..2e868f58697e4284955b0091af06fcf050a7e3aa --- /dev/null +++ b/test/language/expressions/class/fields-literal-name-propname-constructor.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/propname-constructor.case +// - src/class-fields/propname-error/cls-expr-literal-name.template +/*--- +description: Static class fields cannot have PropName 'constructor' (literal name) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: PropName + LiteralPropertyName : IdentifierName + Return StringValue of IdentifierName. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : FieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "constructor". + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + constructor; +} diff --git a/test/language/expressions/class/fields-literal-name-static-propname-constructor.js b/test/language/expressions/class/fields-literal-name-static-propname-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..575a9c99a75556e308050b46e58b07c3f257c03d --- /dev/null +++ b/test/language/expressions/class/fields-literal-name-static-propname-constructor.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/static-propname-constructor.case +// - src/class-fields/propname-error/cls-expr-literal-name.template +/*--- +description: Static class field cannot have PropName 'constructor' (literal name) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: PropName + LiteralPropertyName : IdentifierName + Return StringValue of IdentifierName. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : staticFieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static constructor; +} diff --git a/test/language/expressions/class/fields-literal-name-static-propname-prototype.js b/test/language/expressions/class/fields-literal-name-static-propname-prototype.js new file mode 100644 index 0000000000000000000000000000000000000000..b76526aba55895c127c4fa4194d484b575d32a98 --- /dev/null +++ b/test/language/expressions/class/fields-literal-name-static-propname-prototype.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/static-propname-prototype.case +// - src/class-fields/propname-error/cls-expr-literal-name.template +/*--- +description: Static class fields cannot have PropName 'prototype' (literal name) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: PropName + LiteralPropertyName : IdentifierName + Return StringValue of IdentifierName. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : staticFieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static prototype; +} diff --git a/test/language/expressions/class/fields-string-name-propname-constructor.js b/test/language/expressions/class/fields-string-name-propname-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..487301bd0fef14f4d021d33ab729b18f62fbc6e5 --- /dev/null +++ b/test/language/expressions/class/fields-string-name-propname-constructor.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/propname-constructor.case +// - src/class-fields/propname-error/cls-expr-string-name.template +/*--- +description: Static class fields cannot have PropName 'constructor' (string name) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: PropName + ... + LiteralPropertyName:StringLiteral + Return the String value whose code units are the SV of the StringLiteral. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : FieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "constructor". + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + 'constructor'; +} diff --git a/test/language/expressions/class/fields-string-name-static-propname-constructor.js b/test/language/expressions/class/fields-string-name-static-propname-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..9b695f8dfe1d20ef4b7ac2aadb4e5b5a482453a7 --- /dev/null +++ b/test/language/expressions/class/fields-string-name-static-propname-constructor.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/static-propname-constructor.case +// - src/class-fields/propname-error/cls-expr-string-name.template +/*--- +description: Static class field cannot have PropName 'constructor' (string name) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: PropName + ... + LiteralPropertyName:StringLiteral + Return the String value whose code units are the SV of the StringLiteral. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : staticFieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static 'constructor'; +} diff --git a/test/language/expressions/class/fields-string-name-static-propname-prototype.js b/test/language/expressions/class/fields-string-name-static-propname-prototype.js new file mode 100644 index 0000000000000000000000000000000000000000..b3a28a18ee28eb329dedfac676e1c56433ef59e2 --- /dev/null +++ b/test/language/expressions/class/fields-string-name-static-propname-prototype.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/static-propname-prototype.case +// - src/class-fields/propname-error/cls-expr-string-name.template +/*--- +description: Static class fields cannot have PropName 'prototype' (string name) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: PropName + ... + LiteralPropertyName:StringLiteral + Return the String value whose code units are the SV of the StringLiteral. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : staticFieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +var C = class { + static 'prototype'; +} diff --git a/test/language/statements/class/fields-computed-name-propname-constructor.js b/test/language/statements/class/fields-computed-name-propname-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..238e373b28589fa8d7816513ccb770f8fceaf838 --- /dev/null +++ b/test/language/statements/class/fields-computed-name-propname-constructor.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/propname-constructor.case +// - src/class-fields/propname-error/cls-decl-computed-name.template +/*--- +description: Static class fields cannot have PropName 'constructor' (computed) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +info: | + Static Semantics: PropName + ... + ComputedPropertyName : [ AssignmentExpression ] + Return empty. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : FieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "constructor". + +---*/ + + +var x = "constructor"; +class C { + [x]; +} + +var c = new C(); + +assert.sameValue(c.hasOwnProperty("constructor"), true); diff --git a/test/language/statements/class/fields-computed-name-static-propname-constructor.js b/test/language/statements/class/fields-computed-name-static-propname-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..e9be37e0a77beab93f3372323bd690139a1eb40a --- /dev/null +++ b/test/language/statements/class/fields-computed-name-static-propname-constructor.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/static-propname-constructor.case +// - src/class-fields/propname-error/cls-decl-computed-name.template +/*--- +description: Static class field cannot have PropName 'constructor' (computed) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +info: | + Static Semantics: PropName + ... + ComputedPropertyName : [ AssignmentExpression ] + Return empty. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : staticFieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +---*/ + + +var x = "constructor"; +class C { + static [x]; +} + +var c = new C(); + +assert.sameValue(c.hasOwnProperty("constructor"), true); diff --git a/test/language/statements/class/fields-computed-name-static-propname-prototype.js b/test/language/statements/class/fields-computed-name-static-propname-prototype.js new file mode 100644 index 0000000000000000000000000000000000000000..2835696615f3b5c6a0cf462af816dc6ce4fb3fa4 --- /dev/null +++ b/test/language/statements/class/fields-computed-name-static-propname-prototype.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/static-propname-prototype.case +// - src/class-fields/propname-error/cls-decl-computed-name.template +/*--- +description: Static class fields cannot have PropName 'prototype' (computed) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +info: | + Static Semantics: PropName + ... + ComputedPropertyName : [ AssignmentExpression ] + Return empty. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : staticFieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +---*/ + + +var x = "prototype"; +class C { + static [x]; +} + +var c = new C(); + +assert.sameValue(c.hasOwnProperty("prototype"), true); diff --git a/test/language/statements/class/fields-literal-name-propname-constructor.js b/test/language/statements/class/fields-literal-name-propname-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..9167ba7d37409ba49fc9cd630f0d531458560821 --- /dev/null +++ b/test/language/statements/class/fields-literal-name-propname-constructor.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/propname-constructor.case +// - src/class-fields/propname-error/cls-decl-literal-name.template +/*--- +description: Static class fields cannot have PropName 'constructor' (literal name) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: PropName + LiteralPropertyName : IdentifierName + Return StringValue of IdentifierName. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : FieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "constructor". + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + constructor; +} diff --git a/test/language/statements/class/fields-literal-name-static-propname-constructor.js b/test/language/statements/class/fields-literal-name-static-propname-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..e66a47dbc83a621daadaba12eddc0b55516773c2 --- /dev/null +++ b/test/language/statements/class/fields-literal-name-static-propname-constructor.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/static-propname-constructor.case +// - src/class-fields/propname-error/cls-decl-literal-name.template +/*--- +description: Static class field cannot have PropName 'constructor' (literal name) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: PropName + LiteralPropertyName : IdentifierName + Return StringValue of IdentifierName. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : staticFieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + static constructor; +} diff --git a/test/language/statements/class/fields-literal-name-static-propname-prototype.js b/test/language/statements/class/fields-literal-name-static-propname-prototype.js new file mode 100644 index 0000000000000000000000000000000000000000..b2818e72302d502a97ba82ba0467c68ac363b499 --- /dev/null +++ b/test/language/statements/class/fields-literal-name-static-propname-prototype.js @@ -0,0 +1,31 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/static-propname-prototype.case +// - src/class-fields/propname-error/cls-decl-literal-name.template +/*--- +description: Static class fields cannot have PropName 'prototype' (literal name) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: PropName + LiteralPropertyName : IdentifierName + Return StringValue of IdentifierName. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : staticFieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + static prototype; +} diff --git a/test/language/statements/class/fields-string-name-propname-constructor.js b/test/language/statements/class/fields-string-name-propname-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..01b53e20b8cc9207b638475263d2debdc4682e7e --- /dev/null +++ b/test/language/statements/class/fields-string-name-propname-constructor.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/propname-constructor.case +// - src/class-fields/propname-error/cls-decl-string-name.template +/*--- +description: Static class fields cannot have PropName 'constructor' (string name) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: PropName + ... + LiteralPropertyName:StringLiteral + Return the String value whose code units are the SV of the StringLiteral. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : FieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "constructor". + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + 'constructor'; +} diff --git a/test/language/statements/class/fields-string-name-static-propname-constructor.js b/test/language/statements/class/fields-string-name-static-propname-constructor.js new file mode 100644 index 0000000000000000000000000000000000000000..0a33f6204f76e14a1066642708d10db9e6c8a66f --- /dev/null +++ b/test/language/statements/class/fields-string-name-static-propname-constructor.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/static-propname-constructor.case +// - src/class-fields/propname-error/cls-decl-string-name.template +/*--- +description: Static class field cannot have PropName 'constructor' (string name) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: PropName + ... + LiteralPropertyName:StringLiteral + Return the String value whose code units are the SV of the StringLiteral. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : staticFieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + static 'constructor'; +} diff --git a/test/language/statements/class/fields-string-name-static-propname-prototype.js b/test/language/statements/class/fields-string-name-static-propname-prototype.js new file mode 100644 index 0000000000000000000000000000000000000000..74c89cd44550bfb21af66ca859899a88f695031e --- /dev/null +++ b/test/language/statements/class/fields-string-name-static-propname-prototype.js @@ -0,0 +1,32 @@ +// This file was procedurally generated from the following sources: +// - src/class-fields/static-propname-prototype.case +// - src/class-fields/propname-error/cls-decl-string-name.template +/*--- +description: Static class fields cannot have PropName 'prototype' (string name) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-fields] +flags: [generated] +negative: + phase: early + type: SyntaxError +info: | + Static Semantics: PropName + ... + LiteralPropertyName:StringLiteral + Return the String value whose code units are the SV of the StringLiteral. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : staticFieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +---*/ + + +throw "Test262: This statement should not be evaluated."; + +class C { + static 'prototype'; +}