mirror of
https://github.com/tc39/test262.git
synced 2025-07-29 17:04:31 +02:00
Generate tests
This commit is contained in:
parent
f11568dbde
commit
9ccf0a822f
@ -0,0 +1,57 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (AssignmentExpression) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
var _;
|
||||||
|
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #[_ = 'str' + 'ing']() { return 'get string'; }
|
||||||
|
set #[_ = 'str' + 'ing'](param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'string';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'string' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-binary.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in binary notation) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #0b10() { return 'get string'; }
|
||||||
|
set #0b10(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'2';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'2' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-exponent.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in exponent notation) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #1E+9() { return 'get string'; }
|
||||||
|
set #1E+9(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'1000000000';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'1000000000' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-hex.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in hexadecimal notation) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #0x10() { return 'get string'; }
|
||||||
|
set #0x10(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'16';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'16' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-leading-decimal.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with leading decimal point) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #.1() { return 'get string'; }
|
||||||
|
set #.1(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'0.1';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'0.1' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-non-canonical.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with non-canonical representation) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #0.0000001() { return 'get string'; }
|
||||||
|
set #0.0000001(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'1e-7';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'1e-7' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-octal.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in octal notation) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #0o10() { return 'get string'; }
|
||||||
|
set #0o10(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'8';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'8' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-zero.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal zero) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #0() { return 'get string'; }
|
||||||
|
set #0(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'0';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'0' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-char-escape.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a character escape sequence) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #'character\tescape'() { return 'get string'; }
|
||||||
|
set #'character\tescape'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'character escape';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'character escape' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-double-quote.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using double quotes) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #"doubleQuote"() { return 'get string'; }
|
||||||
|
set #"doubleQuote"(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#"doubleQuote";
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#"doubleQuote" = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-empty.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal, the empty string) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #''() { return 'get string'; }
|
||||||
|
set #''(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-hex-escape.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a hexadecimal escape sequence) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #'hex\x45scape'() { return 'get string'; }
|
||||||
|
set #'hex\x45scape'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'hexEscape';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'hexEscape' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,57 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-line-continuation.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing LineContinuation) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #'line\
|
||||||
|
Continuation'() { return 'get string'; }
|
||||||
|
set #'line\
|
||||||
|
Continuation'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'lineContinuation';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'lineContinuation' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-single-quote.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using single quotes) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #'singleQuote'() { return 'get string'; }
|
||||||
|
set #'singleQuote'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'singleQuote';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'singleQuote' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-unicode-escape.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a Unicode escape sequence) (Class expression, instance private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
get #'unicod\u{000065}Escape'() { return 'get string'; }
|
||||||
|
set #'unicod\u{000065}Escape'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'unicodeEscape';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'unicodeEscape' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,56 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (AssignmentExpression) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
var _;
|
||||||
|
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #[_ = 'str' + 'ing']() { return 'get string'; }
|
||||||
|
static set #[_ = 'str' + 'ing'](param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'string';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'string' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-binary.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in binary notation) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #0b10() { return 'get string'; }
|
||||||
|
static set #0b10(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'2';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'2' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-exponent.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in exponent notation) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #1E+9() { return 'get string'; }
|
||||||
|
static set #1E+9(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'1000000000';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'1000000000' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-hex.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in hexadecimal notation) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #0x10() { return 'get string'; }
|
||||||
|
static set #0x10(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'16';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'16' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-leading-decimal.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with leading decimal point) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #.1() { return 'get string'; }
|
||||||
|
static set #.1(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'0.1';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'0.1' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-non-canonical.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with non-canonical representation) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #0.0000001() { return 'get string'; }
|
||||||
|
static set #0.0000001(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'1e-7';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'1e-7' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-octal.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in octal notation) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #0o10() { return 'get string'; }
|
||||||
|
static set #0o10(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'8';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'8' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-zero.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal zero) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #0() { return 'get string'; }
|
||||||
|
static set #0(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'0';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'0' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-char-escape.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a character escape sequence) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #'character\tescape'() { return 'get string'; }
|
||||||
|
static set #'character\tescape'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'character escape';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'character escape' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-double-quote.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using double quotes) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #"doubleQuote"() { return 'get string'; }
|
||||||
|
static set #"doubleQuote"(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#"doubleQuote";
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#"doubleQuote" = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-empty.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal, the empty string) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #''() { return 'get string'; }
|
||||||
|
static set #''(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-hex-escape.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a hexadecimal escape sequence) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #'hex\x45scape'() { return 'get string'; }
|
||||||
|
static set #'hex\x45scape'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'hexEscape';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'hexEscape' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,56 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-line-continuation.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing LineContinuation) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #'line\
|
||||||
|
Continuation'() { return 'get string'; }
|
||||||
|
static set #'line\
|
||||||
|
Continuation'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'lineContinuation';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'lineContinuation' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-single-quote.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using single quotes) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #'singleQuote'() { return 'get string'; }
|
||||||
|
static set #'singleQuote'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'singleQuote';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'singleQuote' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-unicode-escape.case
|
||||||
|
// - src/accessor-names/default/cls-private-expr-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a Unicode escape sequence) (Class expression, static private method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
var C = class {
|
||||||
|
static get #'unicod\u{000065}Escape'() { return 'get string'; }
|
||||||
|
static set #'unicod\u{000065}Escape'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'unicodeEscape';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'unicodeEscape' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,57 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (AssignmentExpression) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
var _;
|
||||||
|
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #[_ = 'str' + 'ing']() { return 'get string'; }
|
||||||
|
set #[_ = 'str' + 'ing'](param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'string';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'string' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-binary.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in binary notation) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #0b10() { return 'get string'; }
|
||||||
|
set #0b10(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'2';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'2' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-exponent.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in exponent notation) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #1E+9() { return 'get string'; }
|
||||||
|
set #1E+9(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'1000000000';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'1000000000' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-hex.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in hexadecimal notation) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #0x10() { return 'get string'; }
|
||||||
|
set #0x10(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'16';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'16' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-leading-decimal.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with leading decimal point) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #.1() { return 'get string'; }
|
||||||
|
set #.1(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'0.1';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'0.1' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-non-canonical.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with non-canonical representation) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #0.0000001() { return 'get string'; }
|
||||||
|
set #0.0000001(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'1e-7';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'1e-7' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-octal.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in octal notation) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #0o10() { return 'get string'; }
|
||||||
|
set #0o10(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'8';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'8' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-zero.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal zero) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #0() { return 'get string'; }
|
||||||
|
set #0(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'0';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'0' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-char-escape.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a character escape sequence) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #'character\tescape'() { return 'get string'; }
|
||||||
|
set #'character\tescape'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'character escape';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'character escape' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-double-quote.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using double quotes) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #"doubleQuote"() { return 'get string'; }
|
||||||
|
set #"doubleQuote"(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#"doubleQuote";
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#"doubleQuote" = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-empty.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal, the empty string) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #''() { return 'get string'; }
|
||||||
|
set #''(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-hex-escape.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a hexadecimal escape sequence) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #'hex\x45scape'() { return 'get string'; }
|
||||||
|
set #'hex\x45scape'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'hexEscape';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'hexEscape' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,57 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-line-continuation.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing LineContinuation) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #'line\
|
||||||
|
Continuation'() { return 'get string'; }
|
||||||
|
set #'line\
|
||||||
|
Continuation'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'lineContinuation';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'lineContinuation' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-single-quote.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using single quotes) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #'singleQuote'() { return 'get string'; }
|
||||||
|
set #'singleQuote'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'singleQuote';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'singleQuote' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,55 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-unicode-escape.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-inst.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a Unicode escape sequence) (Class declaration, private instance method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
get #'unicod\u{000065}Escape'() { return 'get string'; }
|
||||||
|
set #'unicod\u{000065}Escape'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
getPrivateReference() {
|
||||||
|
return this.#'unicodeEscape';
|
||||||
|
}
|
||||||
|
|
||||||
|
setPrivateReference(value) {
|
||||||
|
this.#'unicodeEscape' = value;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
var inst = C();
|
||||||
|
|
||||||
|
assert.sameValue(inst.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
inst.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
@ -0,0 +1,56 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/computed.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (AssignmentExpression) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
var _;
|
||||||
|
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #[_ = 'str' + 'ing']() { return 'get string'; }
|
||||||
|
static set #[_ = 'str' + 'ing'](param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'string';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'string' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-binary.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in binary notation) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #0b10() { return 'get string'; }
|
||||||
|
static set #0b10(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'2';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'2' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-exponent.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in exponent notation) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #1E+9() { return 'get string'; }
|
||||||
|
static set #1E+9(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'1000000000';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'1000000000' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-hex.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in hexadecimal notation) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #0x10() { return 'get string'; }
|
||||||
|
static set #0x10(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'16';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'16' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-leading-decimal.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with leading decimal point) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #.1() { return 'get string'; }
|
||||||
|
static set #.1(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'0.1';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'0.1' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-non-canonical.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal with non-canonical representation) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #0.0000001() { return 'get string'; }
|
||||||
|
static set #0.0000001(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'1e-7';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'1e-7' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-octal.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal in octal notation) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #0o10() { return 'get string'; }
|
||||||
|
static set #0o10(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'8';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'8' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-numeric-zero.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (numeric literal zero) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #0() { return 'get string'; }
|
||||||
|
static set #0(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'0';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'0' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-char-escape.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a character escape sequence) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #'character\tescape'() { return 'get string'; }
|
||||||
|
static set #'character\tescape'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'character escape';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'character escape' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-double-quote.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using double quotes) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #"doubleQuote"() { return 'get string'; }
|
||||||
|
static set #"doubleQuote"(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#"doubleQuote";
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#"doubleQuote" = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-empty.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal, the empty string) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #''() { return 'get string'; }
|
||||||
|
static set #''(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-hex-escape.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a hexadecimal escape sequence) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #'hex\x45scape'() { return 'get string'; }
|
||||||
|
static set #'hex\x45scape'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'hexEscape';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'hexEscape' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,56 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-line-continuation.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing LineContinuation) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #'line\
|
||||||
|
Continuation'() { return 'get string'; }
|
||||||
|
static set #'line\
|
||||||
|
Continuation'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'lineContinuation';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'lineContinuation' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-single-quote.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal using single quotes) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #'singleQuote'() { return 'get string'; }
|
||||||
|
static set #'singleQuote'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'singleQuote';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'singleQuote' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
@ -0,0 +1,54 @@
|
|||||||
|
// This file was procedurally generated from the following sources:
|
||||||
|
// - src/accessor-names/literal-string-unicode-escape.case
|
||||||
|
// - src/accessor-names/default/cls-private-decl-static.template
|
||||||
|
/*---
|
||||||
|
description: Computed values as accessor property names (string literal containing a Unicode escape sequence) (Class declaration, static method)
|
||||||
|
flags: [generated]
|
||||||
|
info: |
|
||||||
|
[...]
|
||||||
|
MethodDefinition[Yield, Await]:
|
||||||
|
PropertyNameClassElementName [?Yield, ?Await](
|
||||||
|
UniqueFormalParameters [~Yield, ~Await] ) {
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod[?Yield, ?Await]
|
||||||
|
get PropertyName ClassElementName [?Yield, ?Await] (){
|
||||||
|
FunctionBody [~Yield, ~Await] }
|
||||||
|
set PropertyNameClassElementName [?Yield, ?Await] (
|
||||||
|
PropertySetParameterList ) { FunctionBody [~Yield, ~Await] }
|
||||||
|
AsyncMethod [Yield, Await]:
|
||||||
|
async [no LineTerminator here] PropertyName
|
||||||
|
ClassElementName[?Yield, ?Await](
|
||||||
|
UniqueFormalParameters[~Yield, +Await] ) { AsyncFunctionBody }
|
||||||
|
|
||||||
|
|
||||||
|
12.2.6.7 Runtime Semantics: Evaluation
|
||||||
|
|
||||||
|
[...]
|
||||||
|
|
||||||
|
ComputedPropertyName : [ AssignmentExpression ]
|
||||||
|
|
||||||
|
1. Let exprValue be the result of evaluating AssignmentExpression.
|
||||||
|
2. Let propName be ? GetValue(exprValue).
|
||||||
|
3. Return ? ToPropertyKey(propName).
|
||||||
|
---*/
|
||||||
|
|
||||||
|
var stringSet;
|
||||||
|
|
||||||
|
class C {
|
||||||
|
static get #'unicod\u{000065}Escape'() { return 'get string'; }
|
||||||
|
static set #'unicod\u{000065}Escape'(param) { stringSet = param; }
|
||||||
|
|
||||||
|
static getPrivateReference() {
|
||||||
|
return this.#'unicodeEscape';
|
||||||
|
}
|
||||||
|
|
||||||
|
static setPrivateReference(value) {
|
||||||
|
this.#'unicodeEscape' = value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
assert.sameValue(C.getPrivateReference(), 'get string');
|
||||||
|
|
||||||
|
C.setPrivateReference('set string');
|
||||||
|
assert.sameValue(stringSet, 'set string');
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user