2017-10-21 02:39:24 +02:00
|
|
|
// 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
|
|
|
|
/*---
|
2017-10-31 19:49:00 +01:00
|
|
|
description: class fields forbid PropName 'constructor' (early error -- PropName of IdentifierName is forbidden value)
|
2017-10-21 02:39:24 +02:00
|
|
|
esid: sec-class-definitions-static-semantics-early-errors
|
2017-11-28 18:49:12 +01:00
|
|
|
features: [class, class-fields-public]
|
2017-10-21 02:39:24 +02:00
|
|
|
flags: [generated]
|
|
|
|
negative:
|
2017-12-03 06:06:42 +01:00
|
|
|
phase: parse
|
2017-10-21 02:39:24 +02:00
|
|
|
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 {
|
2017-11-10 21:06:00 +01:00
|
|
|
constructor;
|
2017-10-21 02:39:24 +02:00
|
|
|
}
|