mirror of https://github.com/tc39/test262.git
Class Fields: convert propname-error into non-generated to avoid creating erroneous tests where restrictions do not align.
This commit is contained in:
parent
7bb3bfe7fd
commit
734544272b
|
@ -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);
|
||||
|
|
|
@ -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];
|
||||
};
|
|
@ -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];
|
||||
};
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
};
|
|
@ -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;
|
||||
};
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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';
|
||||
};
|
|
@ -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';
|
||||
};
|
|
@ -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 {
|
||||
|
|
|
@ -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];
|
||||
}
|
|
@ -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];
|
||||
}
|
|
@ -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"];
|
||||
}
|
|
@ -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"];
|
||||
}
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue