Merge pull request #1301 from bocoup/classfields

More class fields test of early errors
This commit is contained in:
Leo Balter 2017-10-18 16:59:59 -04:00 committed by GitHub
commit 893013a658
51 changed files with 775 additions and 20 deletions

View File

@ -0,0 +1,16 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-private-arrow-fnc-
name: private field, arrow function expression
features: [arrow-function]
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = () => /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-private-literal-name-
name: ClassElementName PrivateName
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-private-ternary-
name: private field, ternary expression
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = false ? {} : /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-private-typeof-
name: private field, typeof expression
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = typeof /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/statements/class/fields-static-private-
name: static PrivateName
---*/
throw "Test262: This statement should not be evaluated.";
class C {
static #x = /*{ initializer }*/;
}

View File

@ -0,0 +1,15 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-private-arrow-fnc-
name: private field, arrow function expression
features: [arrow-function]
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = () => /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-private-literal-name-
name: ClassElementName PrivateName
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-private-ternary-
name: private field, ternary expression
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = true ? {} : /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-private-typeof-
name: private field, typeof expression
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = typeof /*{ initializer }*/;
}

View File

@ -0,0 +1,14 @@
// Copyright (C) 2017 Valerie Young. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-class-definitions-static-semantics-early-errors
path: language/expressions/class/fields-static-private-
name: static PrivateName
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
static #x = /*{ initializer }*/;
}

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-arrow-fnc.template
/*---
description: Syntax error if `arguments` used in class field (arrow function expression)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-comp-name.template
/*---
description: Syntax error if `arguments` used in class field (computed ClassElementName)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-equality.template
/*---
description: Syntax error if `arguments` used in class field (equality expression)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-literal-name.template
/*---
description: Syntax error if `arguments` used in class field (literal ClassElementName)

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-private-arrow-fnc.template
/*---
description: Syntax error if `arguments` used in class field (private field, arrow function expression)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields, arrow-function]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if ContainsArguments of Initializer 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.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = () => arguments;
}

View File

@ -0,0 +1,27 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-super.case
// - src/class-fields/initializer-error/cls-expr-fields-private-arrow-fnc.template
/*---
description: Syntax error if `super()` used in class field (private field, arrow function expression)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields, arrow-function]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = () => super();
}

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-private-name.template
/*---
description: Syntax error if `arguments` used in class field (ClassElementName PrivateName)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if ContainsArguments of Initializer 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.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = arguments;
}

View File

@ -0,0 +1,27 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-super.case
// - src/class-fields/initializer-error/cls-expr-fields-private-name.template
/*---
description: Syntax error if `super()` used in class field (ClassElementName PrivateName)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = super();
}

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-private-ternary.template
/*---
description: Syntax error if `arguments` used in class field (private field, ternary expression)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if ContainsArguments of Initializer 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.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = true ? {} : arguments;
}

View File

@ -0,0 +1,27 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-super.case
// - src/class-fields/initializer-error/cls-expr-fields-private-ternary.template
/*---
description: Syntax error if `super()` used in class field (private field, ternary expression)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = true ? {} : super();
}

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-private-typeof.template
/*---
description: Syntax error if `arguments` used in class field (private field, typeof expression)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if ContainsArguments of Initializer 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.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = typeof arguments;
}

View File

@ -0,0 +1,27 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-super.case
// - src/class-fields/initializer-error/cls-expr-fields-private-typeof.template
/*---
description: Syntax error if `super()` used in class field (private field, typeof expression)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
#x = typeof super();
}

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-static-comp-name.template
/*---
description: Syntax error if `arguments` used in class field (static computed ClassElementName)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-static-literal-name.template
/*---
description: Syntax error if `arguments` used in class field (static literal ClassElementName)

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-static-private-name.template
/*---
description: Syntax error if `arguments` used in class field (static PrivateName)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if ContainsArguments of Initializer 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.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
static #x = arguments;
}

View File

@ -0,0 +1,27 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-super.case
// - src/class-fields/initializer-error/cls-expr-fields-static-private-name.template
/*---
description: Syntax error if `super()` used in class field (static PrivateName)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
---*/
throw "Test262: This statement should not be evaluated.";
var C = class {
static #x = super();
}

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-static-string-literal-name.template
/*---
description: Syntax error if `arguments` used in class field (static string literal ClassElementName)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-string-literal-name.template
/*---
description: Syntax error if `arguments` used in class field (string literal ClassElementName)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-ternary.template
/*---
description: Syntax error if `arguments` used in class field (ternary expression)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-expr-fields-typeof.template
/*---
description: Syntax error if `arguments` used in class field (typeof expression)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-arrow-fnc.template
/*---
description: Syntax error if `arguments` used in class field (arrow function expression)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-comp-name.template
/*---
description: Syntax error if `arguments` used in class field (computed ClassElementName)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-equality.template
/*---
description: Syntax error if `arguments` used in class field (equality expression)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-literal-name.template
/*---
description: Syntax error if `arguments` used in class field (literal ClassElementName)

View File

@ -0,0 +1,35 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-private-arrow-fnc.template
/*---
description: Syntax error if `arguments` used in class field (private field, arrow function expression)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields, arrow-function]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if ContainsArguments of Initializer 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.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = () => arguments;
}

View File

@ -0,0 +1,28 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-super.case
// - src/class-fields/initializer-error/cls-decl-fields-private-arrow-fnc.template
/*---
description: Syntax error if `super()` used in class field (private field, arrow function expression)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields, arrow-function]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = () => super();
}

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-private-name.template
/*---
description: Syntax error if `arguments` used in class field (ClassElementName PrivateName)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if ContainsArguments of Initializer 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.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = arguments;
}

View File

@ -0,0 +1,27 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-super.case
// - src/class-fields/initializer-error/cls-decl-fields-private-name.template
/*---
description: Syntax error if `super()` used in class field (ClassElementName PrivateName)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = super();
}

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-private-ternary.template
/*---
description: Syntax error if `arguments` used in class field (private field, ternary expression)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if ContainsArguments of Initializer 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.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = false ? {} : arguments;
}

View File

@ -0,0 +1,27 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-super.case
// - src/class-fields/initializer-error/cls-decl-fields-private-ternary.template
/*---
description: Syntax error if `super()` used in class field (private field, ternary expression)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = false ? {} : super();
}

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-private-typeof.template
/*---
description: Syntax error if `arguments` used in class field (private field, typeof expression)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if ContainsArguments of Initializer 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.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = typeof arguments;
}

View File

@ -0,0 +1,27 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-super.case
// - src/class-fields/initializer-error/cls-decl-fields-private-typeof.template
/*---
description: Syntax error if `super()` used in class field (private field, typeof expression)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
#x = typeof super();
}

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-static-comp-name.template
/*---
description: Syntax error if `arguments` used in class field (static computed ClassElementName)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-static-literal-name.template
/*---
description: Syntax error if `arguments` used in class field (static literal ClassElementName)

View File

@ -0,0 +1,34 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-static-private-name.template
/*---
description: Syntax error if `arguments` used in class field (static PrivateName)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if ContainsArguments of Initializer 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.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
static #x = arguments;
}

View File

@ -0,0 +1,27 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-super.case
// - src/class-fields/initializer-error/cls-decl-fields-static-private-name.template
/*---
description: Syntax error if `super()` used in class field (static PrivateName)
esid: sec-class-definitions-static-semantics-early-errors
features: [class-fields]
flags: [generated]
negative:
phase: early
type: SyntaxError
info: |
Static Semantics: Early Errors
FieldDefinition:
PropertyNameInitializeropt
- It is a Syntax Error if Initializer is present and Initializer Contains SuperCall is true.
---*/
throw "Test262: This statement should not be evaluated.";
class C {
static #x = super();
}

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-static-string-literal-name.template
/*---
description: Syntax error if `arguments` used in class field (static string literal ClassElementName)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-string-literal-name.template
/*---
description: Syntax error if `arguments` used in class field (string literal ClassElementName)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-ternary.template
/*---
description: Syntax error if `arguments` used in class field (ternary expression)

View File

@ -1,5 +1,5 @@
// This file was procedurally generated from the following sources:
// - src/class-fields/init-err-contains-boolean.case
// - src/class-fields/init-err-contains-arguments.case
// - src/class-fields/initializer-error/cls-decl-fields-typeof.template
/*---
description: Syntax error if `arguments` used in class field (typeof expression)