Generate tests

This commit is contained in:
Leo Balter 2018-11-30 18:35:01 -05:00 committed by Rick Waldron
parent 8b2b4c35ca
commit 3703d2bad1
84 changed files with 4156 additions and 0 deletions

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-field-initializer.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, class field initializer in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
f = (() => {})().#x
};

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-expr-field-initializer.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, class field initializer in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
f = (() => this)().#x
};

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-field-initializer-fn.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, function in class field initializer in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
f = function() { (() => {})().#x }
};

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-expr-field-initializer-fn.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, function in class field initializer in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
f = function() { (() => this)().#x }
};

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-field-initializer-fn.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, function in class field initializer in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
f = function() { something.#x }
};

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-expr-field-initializer-fn.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, function in class field initializer in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
f = function() { this.#x }
};

View File

@ -0,0 +1,56 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-field-initializer-heritage.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, field initializer in inner class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
var C = class extends Parent {
f = (() => {})().#x
};

View File

@ -0,0 +1,56 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-expr-field-initializer-heritage.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, field initializer in inner class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
var C = class extends Parent {
f = (() => this)().#x
};

View File

@ -0,0 +1,56 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-field-initializer-heritage.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, field initializer in inner class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
var C = class extends Parent {
f = something.#x
};

View File

@ -0,0 +1,56 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-expr-field-initializer-heritage.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, field initializer in inner class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
var C = class extends Parent {
f = this.#x
};

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-field-initializer.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, class field initializer in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
f = something.#x
};

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-expr-field-initializer.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, class field initializer in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
f = this.#x
};

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-method.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
m() { (() => {})().#x }
};

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-expr-method.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
m() { (() => this)().#x }
};

View File

@ -0,0 +1,54 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-method-fn.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, inner function in method in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
m() {
function fn() { (() => {})().#x }
}
};

View File

@ -0,0 +1,54 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-expr-method-fn.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, inner function in method in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
m() {
function fn() { (() => this)().#x }
}
};

View File

@ -0,0 +1,54 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-method-fn.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, inner function in method in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
m() {
function fn() { something.#x }
}
};

View File

@ -0,0 +1,54 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-expr-method-fn.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, inner function in method in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
m() {
function fn() { this.#x }
}
};

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-method-heritage.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in inner class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
var C = class extends Parent {
m() {
(() => {})().#x
}
};

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-expr-method-heritage.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in inner class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
var C = class extends Parent {
m() {
(() => this)().#x
}
};

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-method-heritage.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in inner class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
var C = class extends Parent {
m() {
something.#x
}
};

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-expr-method-heritage.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, method in inner class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
var C = class extends Parent {
m() {
this.#x
}
};

View File

@ -0,0 +1,57 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-inner-method.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in inner class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
#x = 42;
m() {
class Inner {
z() { (() => {})().#x }
}
}
};

View File

@ -0,0 +1,57 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-expr-inner-method.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in inner class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
#x = 42;
m() {
class Inner {
z() { (() => this)().#x }
}
}
};

View File

@ -0,0 +1,57 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-inner-method.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in inner class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
#x = 42;
m() {
class Inner {
z() { something.#x }
}
}
};

View File

@ -0,0 +1,57 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-expr-inner-method.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, method in inner class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
#x = 42;
m() {
class Inner {
z() { this.#x }
}
}
};

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-method.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
m() { something.#x }
};

View File

@ -0,0 +1,52 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-expr-method.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, method in class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
m() { this.#x }
};

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-outter-method.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in outter class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
m() {
class Outter {
#x = 42;
}
this.#x;
}
};

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-expr-outter-method.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in outter class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
m() {
class Outter {
#x = 42;
}
this.#x;
}
};

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-expr-outter-method.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in outter class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
m() {
class Outter {
#x = 42;
}
this.#x;
}
};

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-expr-outter-method.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, method in outter class expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var C = class {
m() {
class Outter {
#x = 42;
}
this.#x;
}
};

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/function-expr.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, inside function expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var fn = function() { (() => {})().#x };

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/function-expr.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, inside function expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var fn = function() { (() => this)().#x };

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/function-expr.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, inside function expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var fn = function() { something.#x };

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/function-expr.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, inside function expression)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
var fn = function() { this.#x };

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/top-level-scriptbody.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, top level of script body)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
(() => {})().#x

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/top-level-scriptbody.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, top level of script body)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
(() => this)().#x

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/top-level-scriptbody.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, top level of script body)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
something.#x

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/top-level-scriptbody.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, top level of script body)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
this.#x

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/top-level-modulebody.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, top level of module body)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated, module]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
(() => {})().#x

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/top-level-modulebody.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, top level of module body)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated, module]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
(() => this)().#x

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/top-level-modulebody.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, top level of module body)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated, module]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
something.#x

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/top-level-modulebody.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, top level of module body)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated, module]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
this.#x

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/block.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, block statement)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
{ (() => {})().#x }

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/block.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, block statement)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
{ (() => this)().#x }

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/block.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, block statement)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
{ something.#x }

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/block.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, block statement)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
{ this.#x }

View File

@ -0,0 +1,42 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-field-initializer.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
f = (() => {})().#x
}

View File

@ -0,0 +1,42 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-decl-field-initializer.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
f = (() => this)().#x
}

View File

@ -0,0 +1,42 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-field-initializer-fn.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, function in class field initializer in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
f = function() { (() => {})().#x }
}

View File

@ -0,0 +1,42 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-decl-field-initializer-fn.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, function in class field initializer in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
f = function() { (() => this)().#x }
}

View File

@ -0,0 +1,42 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-field-initializer-fn.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, function in class field initializer in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
f = function() { something.#x }
}

View File

@ -0,0 +1,42 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-decl-field-initializer-fn.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, function in class field initializer in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
f = function() { this.#x }
}

View File

@ -0,0 +1,42 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-field-initializer.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
f = something.#x
}

View File

@ -0,0 +1,42 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-decl-field-initializer.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class, class-fields-public]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
f = this.#x
}

View File

@ -0,0 +1,57 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-field-initializer-heritage.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
class C extends Parent {
f = (() => {})().#x
}

View File

@ -0,0 +1,57 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-decl-field-initializer-heritage.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
class C extends Parent {
f = (() => this)().#x
}

View File

@ -0,0 +1,57 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-field-initializer-heritage.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
class C extends Parent {
f = something.#x
}

View File

@ -0,0 +1,57 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-decl-field-initializer-heritage.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, class field initializer in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
class C extends Parent {
f = this.#x
}

View File

@ -0,0 +1,42 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-method.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
m() { (() => {})().#x }
}

View File

@ -0,0 +1,42 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-decl-method.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
m() { (() => this)().#x }
}

View File

@ -0,0 +1,44 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-method-fn.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, inner function in method in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
m() {
function fn() { (() => {})().#x }
}
}

View File

@ -0,0 +1,44 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-decl-method-fn.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, inner function in method in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
m() {
function fn() { (() => this)().#x }
}
}

View File

@ -0,0 +1,44 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-method-fn.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, inner function in method in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
m() {
function fn() { something.#x }
}
}

View File

@ -0,0 +1,44 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-decl-method-fn.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, inner function in method in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
m() {
function fn() { this.#x }
}
}

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-method-heritage.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
class C extends Parent {
m() {
(() => {})().#x
}
}

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-decl-method-heritage.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
class C extends Parent {
m() {
(() => this)().#x
}
}

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-method-heritage.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
class C extends Parent {
m() {
something.#x
}
}

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-decl-method-heritage.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, method in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class Parent {
#x = 42;
}
class C extends Parent {
m() {
this.#x
}
}

View File

@ -0,0 +1,57 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-inner-method.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in inner class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
#x = 42;
m() {
class Inner {
z() { (() => {})().#x }
}
}
}

View File

@ -0,0 +1,57 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-decl-inner-method.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in inner class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
#x = 42;
m() {
class Inner {
z() { (() => this)().#x }
}
}
}

View File

@ -0,0 +1,57 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-inner-method.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in inner class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
#x = 42;
m() {
class Inner {
z() { something.#x }
}
}
}

View File

@ -0,0 +1,57 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-decl-inner-method.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, method in inner class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
#x = 42;
m() {
class Inner {
z() { this.#x }
}
}
}

View File

@ -0,0 +1,42 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-method.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
m() { something.#x }
}

View File

@ -0,0 +1,42 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-decl-method.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, method in class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
m() { this.#x }
}

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-outter-method.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, method in outter class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
m() {
class Outter {
#x = 42;
}
this.#x;
}
}

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/cls-decl-outter-method.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, method in outter class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
m() {
class Outter {
#x = 42;
}
this.#x;
}
}

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/cls-decl-outter-method.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, method in outter class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
m() {
class Outter {
#x = 42;
}
this.#x;
}
}

View File

@ -0,0 +1,58 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/cls-decl-outter-method.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, method in outter class declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private, class]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
ClassBody : ClassElementList
1. Let newNames be the concatenation of names with PrivateBoundNames of ClassBody.
2. Return AllPrivateNamesValid of ClassElementList with the argument newNames.
For all other grammatical productions, recurse on subexpressions/substatements,
passing in the names of the caller. If all pieces return true, then return true.
If any returns false, return false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
class C {
m() {
class Outter {
#x = 42;
}
this.#x;
}
}

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-bad-reference.case
// - src/invalid-private-names/default/function-decl.template
/*---
description: bad reference in call expression (Invalid private names should throw a SyntaxError, inside function declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
function fn() { (() => {})().#x }

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/call-expression-this.case
// - src/invalid-private-names/default/function-decl.template
/*---
description: this evaluated in call expression (Invalid private names should throw a SyntaxError, inside function declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
function fn() { (() => this)().#x }

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-bad-reference.case
// - src/invalid-private-names/default/function-decl.template
/*---
description: bad reference in member expression (Invalid private names should throw a SyntaxError, inside function declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
function fn() { something.#x }

View File

@ -0,0 +1,40 @@
// This file was procedurally generated from the following sources:
// - src/invalid-private-names/member-expression-this.case
// - src/invalid-private-names/default/function-decl.template
/*---
description: this reference in member expression (Invalid private names should throw a SyntaxError, inside function declaration)
esid: sec-static-semantics-early-errors
features: [class-fields-private]
flags: [generated]
negative:
phase: parse
type: SyntaxError
info: |
ScriptBody:StatementList
It is a Syntax Error if AllPrivateNamesValid of StatementList with an empty List
as an argument is false unless the source code is eval code that is being
processed by a direct eval.
ModuleBody:ModuleItemList
It is a Syntax Error if AllPrivateNamesValid of ModuleItemList with an empty List
as an argument is false.
Static Semantics: AllPrivateNamesValid
MemberExpression : MemberExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
CallExpression : CallExpression . PrivateName
1. If StringValue of PrivateName is in names, return true.
2. Return false.
---*/
$DONOTEVALUATE();
function fn() { this.#x }