From 734544272be0824ff701d4328807d6afd93cc13f Mon Sep 17 00:00:00 2001 From: Rick Waldron Date: Mon, 30 Jul 2018 18:35:07 -0400 Subject: [PATCH] Class Fields: convert propname-error into non-generated to avoid creating erroneous tests where restrictions do not align. --- ...elds-computed-name-propname-constructor.js | 19 ++++++----- ...mputed-name-static-propname-constructor.js | 31 ++++++++++++++++++ ...computed-name-static-propname-prototype.js | 32 +++++++++++++++++++ ...ields-literal-name-propname-constructor.js | 8 ++--- ...iteral-name-static-propname-constructor.js | 29 +++++++++++++++++ ...-literal-name-static-propname-prototype.js | 29 +++++++++++++++++ ...fields-string-name-propname-constructor.js | 8 ++--- ...string-name-static-propname-constructor.js | 30 +++++++++++++++++ ...s-string-name-static-propname-prototype.js | 30 +++++++++++++++++ ...elds-computed-name-propname-constructor.js | 13 +++++--- ...tatic-computed-var-propname-constructor.js | 31 ++++++++++++++++++ ...-static-computed-var-propname-prototype.js | 31 ++++++++++++++++++ ...mputed-name-static-propname-constructor.js | 30 +++++++++++++++++ ...computed-name-static-propname-prototype.js | 30 +++++++++++++++++ ...ields-literal-name-propname-constructor.js | 8 ++--- ...iteral-name-static-propname-constructor.js | 29 +++++++++++++++++ ...-literal-name-static-propname-prototype.js | 29 +++++++++++++++++ ...fields-string-name-propname-constructor.js | 8 ++--- ...string-name-static-propname-constructor.js | 12 +++---- ...s-string-name-static-propname-prototype.js | 12 +++---- 20 files changed, 400 insertions(+), 49 deletions(-) create mode 100644 test/language/expressions/class/fields-computed-name-static-propname-constructor.js create mode 100644 test/language/expressions/class/fields-computed-name-static-propname-prototype.js create mode 100644 test/language/expressions/class/fields-literal-name-static-propname-constructor.js create mode 100644 test/language/expressions/class/fields-literal-name-static-propname-prototype.js create mode 100644 test/language/expressions/class/fields-string-name-static-propname-constructor.js create mode 100644 test/language/expressions/class/fields-string-name-static-propname-prototype.js create mode 100644 test/language/statements/class/fields-computed-name-static-computed-var-propname-constructor.js create mode 100644 test/language/statements/class/fields-computed-name-static-computed-var-propname-prototype.js create mode 100644 test/language/statements/class/fields-computed-name-static-propname-constructor.js create mode 100644 test/language/statements/class/fields-computed-name-static-propname-prototype.js create mode 100644 test/language/statements/class/fields-literal-name-static-propname-constructor.js create mode 100644 test/language/statements/class/fields-literal-name-static-propname-prototype.js diff --git a/test/language/expressions/class/fields-computed-name-propname-constructor.js b/test/language/expressions/class/fields-computed-name-propname-constructor.js index 0240885ef8..0050e3a7e5 100644 --- a/test/language/expressions/class/fields-computed-name-propname-constructor.js +++ b/test/language/expressions/class/fields-computed-name-propname-constructor.js @@ -1,33 +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 +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. /*--- description: class fields forbid PropName 'constructor' (no early error -- PropName of ComputedPropertyName not forbidden value) esid: sec-class-definitions-static-semantics-early-errors features: [class, class-fields-public] -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". + +negative: + phase: parse + type: SyntaxError + ---*/ +throw "Test262: This statement should not be evaluated."; var x = "constructor"; var C = class { [x]; }; - -var c = new C(); -assert.sameValue(c.hasOwnProperty("constructor"), true); - -assert.sameValue(C.hasOwnProperty("constructor"), false); 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 0000000000..748e3fb53f --- /dev/null +++ b/test/language/expressions/class/fields-computed-name-static-propname-constructor.js @@ -0,0 +1,31 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: static class field forbid PropName 'constructor' (no early error -- PropName of ComputedPropertyName not forbidden value) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-public] +info: | + Static Semantics: PropName + ... + ComputedPropertyName : [ AssignmentExpression ] + Return empty. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : static FieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +negative: + phase: parse + type: SyntaxError + +---*/ + +throw "Test262: This statement should not be evaluated."; + +var x = "constructor"; +var C = class { + static [x]; +}; 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 0000000000..3d374d8d00 --- /dev/null +++ b/test/language/expressions/class/fields-computed-name-static-propname-prototype.js @@ -0,0 +1,32 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: static class fields forbid PropName 'prototype' (no early error -- PropName of ComputedPropertyName not forbidden value) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-public] +info: | + Static Semantics: PropName + ... + ComputedPropertyName : [ AssignmentExpression ] + Return empty. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : static FieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +negative: + phase: parse + type: SyntaxError + +---*/ + +throw "Test262: This statement should not be evaluated."; + + +var x = "prototype"; +var C = class { + static [x]; +}; diff --git a/test/language/expressions/class/fields-literal-name-propname-constructor.js b/test/language/expressions/class/fields-literal-name-propname-constructor.js index bbb618c1cd..fc3b3545e1 100644 --- a/test/language/expressions/class/fields-literal-name-propname-constructor.js +++ b/test/language/expressions/class/fields-literal-name-propname-constructor.js @@ -1,11 +1,9 @@ -// 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 +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. /*--- description: class fields forbid PropName 'constructor' (early error -- PropName of IdentifierName is forbidden) esid: sec-class-definitions-static-semantics-early-errors features: [class, class-fields-public] -flags: [generated] negative: phase: parse type: SyntaxError @@ -14,7 +12,7 @@ info: | LiteralPropertyName : IdentifierName Return StringValue of IdentifierName. - + // This test file tests the following early error: Static Semantics: Early Errors 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 0000000000..fbfea2a7bd --- /dev/null +++ b/test/language/expressions/class/fields-literal-name-static-propname-constructor.js @@ -0,0 +1,29 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: static class field forbid PropName 'constructor' (early error -- PropName of IdentifierName is forbidden) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-public] +negative: + phase: parse + 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 0000000000..3599dd4450 --- /dev/null +++ b/test/language/expressions/class/fields-literal-name-static-propname-prototype.js @@ -0,0 +1,29 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: static class fields forbid PropName 'prototype' (early error -- PropName of IdentifierName is forbidden) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-public] +negative: + phase: parse + 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 index 039c915a47..d88b246392 100644 --- a/test/language/expressions/class/fields-string-name-propname-constructor.js +++ b/test/language/expressions/class/fields-string-name-propname-constructor.js @@ -1,11 +1,9 @@ -// 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 +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. /*--- description: class fields forbid PropName 'constructor' (early error -- PropName of StringLiteral is forbidden) esid: sec-class-definitions-static-semantics-early-errors features: [class, class-fields-public] -flags: [generated] negative: phase: parse type: SyntaxError @@ -15,7 +13,7 @@ info: | 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 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 0000000000..08a0f7b890 --- /dev/null +++ b/test/language/expressions/class/fields-string-name-static-propname-constructor.js @@ -0,0 +1,30 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: static class field forbid PropName 'constructor' (early error -- PropName of StringLiteral is forbidden) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-public] +negative: + phase: parse + 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 0000000000..43078702ca --- /dev/null +++ b/test/language/expressions/class/fields-string-name-static-propname-prototype.js @@ -0,0 +1,30 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: static class fields forbid PropName 'prototype' (early error -- PropName of StringLiteral is forbidden) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-fields-public] +negative: + phase: parse + 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 index f528e03bd2..46e19b73a8 100644 --- a/test/language/statements/class/fields-computed-name-propname-constructor.js +++ b/test/language/statements/class/fields-computed-name-propname-constructor.js @@ -1,26 +1,29 @@ -// 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 +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. /*--- description: class fields forbid PropName 'constructor' (no early error -- PropName of ComputedPropertyName not forbidden value) esid: sec-class-definitions-static-semantics-early-errors features: [class, class-fields-public] -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". +negative: + phase: parse + type: SyntaxError + ---*/ +throw "Test262: This statement should not be evaluated."; var x = "constructor"; class C { diff --git a/test/language/statements/class/fields-computed-name-static-computed-var-propname-constructor.js b/test/language/statements/class/fields-computed-name-static-computed-var-propname-constructor.js new file mode 100644 index 0000000000..1963899949 --- /dev/null +++ b/test/language/statements/class/fields-computed-name-static-computed-var-propname-constructor.js @@ -0,0 +1,31 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: static class fields forbid PropName 'prototype' (no early error -- PropName of ComputedPropertyName not forbidden value) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-static-fields-public] +info: | + Static Semantics: PropName + ... + ComputedPropertyName : [ AssignmentExpression ] + Return empty. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : static FieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +negative: + phase: parse + type: SyntaxError + +---*/ + +throw "Test262: This statement should not be evaluated."; + +var x = "constructor"; +class C { + static [x]; +} diff --git a/test/language/statements/class/fields-computed-name-static-computed-var-propname-prototype.js b/test/language/statements/class/fields-computed-name-static-computed-var-propname-prototype.js new file mode 100644 index 0000000000..4186915a5f --- /dev/null +++ b/test/language/statements/class/fields-computed-name-static-computed-var-propname-prototype.js @@ -0,0 +1,31 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: static class fields forbid PropName 'prototype' (no early error -- PropName of ComputedPropertyName not forbidden value) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-static-fields-public] +info: | + Static Semantics: PropName + ... + ComputedPropertyName : [ AssignmentExpression ] + Return empty. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : static FieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +negative: + phase: parse + type: SyntaxError + +---*/ + +throw "Test262: This statement should not be evaluated."; + +var x = "prototype"; +class C { + static [x]; +} 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 0000000000..218a01bfe5 --- /dev/null +++ b/test/language/statements/class/fields-computed-name-static-propname-constructor.js @@ -0,0 +1,30 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: static class fields forbid PropName 'prototype' (no early error -- PropName of ComputedPropertyName not forbidden value) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-static-fields-public] +info: | + Static Semantics: PropName + ... + ComputedPropertyName : [ AssignmentExpression ] + Return empty. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : static FieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +negative: + phase: parse + type: SyntaxError + +---*/ + +throw "Test262: This statement should not be evaluated."; + +class C { + static ["constructor"]; +} 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 0000000000..32e416a369 --- /dev/null +++ b/test/language/statements/class/fields-computed-name-static-propname-prototype.js @@ -0,0 +1,30 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: static class fields forbid PropName 'prototype' (no early error -- PropName of ComputedPropertyName not forbidden value) +esid: sec-class-definitions-static-semantics-early-errors +features: [class-static-fields-public] +info: | + Static Semantics: PropName + ... + ComputedPropertyName : [ AssignmentExpression ] + Return empty. + + + // This test file tests the following early error: + Static Semantics: Early Errors + + ClassElement : static FieldDefinition; + It is a Syntax Error if PropName of FieldDefinition is "prototype" or "constructor". + +negative: + phase: parse + type: SyntaxError + +---*/ + +throw "Test262: This statement should not be evaluated."; + +class C { + static ["prototype"]; +} diff --git a/test/language/statements/class/fields-literal-name-propname-constructor.js b/test/language/statements/class/fields-literal-name-propname-constructor.js index a09cc62f66..6145242373 100644 --- a/test/language/statements/class/fields-literal-name-propname-constructor.js +++ b/test/language/statements/class/fields-literal-name-propname-constructor.js @@ -1,11 +1,9 @@ -// 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 +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. /*--- description: class fields forbid PropName 'constructor' (early error -- PropName of IdentifierName is forbidden value) esid: sec-class-definitions-static-semantics-early-errors features: [class, class-fields-public] -flags: [generated] negative: phase: parse type: SyntaxError @@ -14,7 +12,7 @@ info: | LiteralPropertyName : IdentifierName Return StringValue of IdentifierName. - + // This test file tests the following early error: Static Semantics: Early Errors 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 0000000000..bb27a99d4e --- /dev/null +++ b/test/language/statements/class/fields-literal-name-static-propname-constructor.js @@ -0,0 +1,29 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: static class field forbid PropName 'constructor' (early error -- PropName of IdentifierName is forbidden value) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-static-fields-public] +negative: + phase: parse + 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 0000000000..9d18ad1e5a --- /dev/null +++ b/test/language/statements/class/fields-literal-name-static-propname-prototype.js @@ -0,0 +1,29 @@ +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. +/*--- +description: static class fields forbid PropName 'prototype' (early error -- PropName of IdentifierName is forbidden value) +esid: sec-class-definitions-static-semantics-early-errors +features: [class, class-static-fields-public] +negative: + phase: parse + 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 index 1cc9c51530..114b17b405 100644 --- a/test/language/statements/class/fields-string-name-propname-constructor.js +++ b/test/language/statements/class/fields-string-name-propname-constructor.js @@ -1,11 +1,9 @@ -// 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 +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. /*--- description: class fields forbid PropName 'constructor' (early error -- PropName of StringLiteral is forbidden value) esid: sec-class-definitions-static-semantics-early-errors features: [class, class-fields-public] -flags: [generated] negative: phase: parse type: SyntaxError @@ -15,7 +13,7 @@ info: | 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 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 index 7013df4a70..59349a8ad9 100644 --- a/test/language/statements/class/fields-string-name-static-propname-constructor.js +++ b/test/language/statements/class/fields-string-name-static-propname-constructor.js @@ -1,11 +1,9 @@ -// 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 +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. /*--- description: static class field forbid PropName 'constructor' (early error -- PropName of StringLiteral is forbidden value) esid: sec-class-definitions-static-semantics-early-errors -features: [class-fields] -flags: [generated] +features: [class, class-static-fields-public] negative: phase: parse type: SyntaxError @@ -15,7 +13,7 @@ info: | 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 @@ -28,5 +26,5 @@ info: | throw "Test262: This statement should not be evaluated."; class C { - 'constructor'; + 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 index a054249ef4..aa56e8688a 100644 --- a/test/language/statements/class/fields-string-name-static-propname-prototype.js +++ b/test/language/statements/class/fields-string-name-static-propname-prototype.js @@ -1,11 +1,9 @@ -// 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 +// Copyright (C) 2017 Valerie Young. All rights reserved. +// This code is governed by the BSD license found in the LICENSE file. /*--- description: static class fields forbid PropName 'prototype' (early error -- PropName of StringLiteral is forbidden value) esid: sec-class-definitions-static-semantics-early-errors -features: [class-fields] -flags: [generated] +features: [class, class-static-fields-public] negative: phase: parse type: SyntaxError @@ -15,7 +13,7 @@ info: | 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 @@ -28,5 +26,5 @@ info: | throw "Test262: This statement should not be evaluated."; class C { - 'prototype'; + static 'prototype'; }