mirror of
https://github.com/tc39/test262.git
synced 2025-07-28 00:14:35 +02:00
Generate tests
This commit is contained in:
parent
4ca3c51afd
commit
1ab47810d1
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-additive-expression-add.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from additive expression "add" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [1 + 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [1 + 1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [1 + 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [1 + 1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 + 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[1 + 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[1 + 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 + 1] = 2,
|
||||
2
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-additive-expression-subtract.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from additive expression "subtract" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [1 - 1]() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
set [1 - 1](v) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static get [1 - 1]() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static set [1 - 1](v) {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 - 1],
|
||||
0
|
||||
);
|
||||
assert.sameValue(
|
||||
c[1 - 1] = 0,
|
||||
0
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[1 - 1],
|
||||
0
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 - 1] = 0,
|
||||
0
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-arrow-function-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from arrow function (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [() => { }]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
set [() => { }](v) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static get [() => { }]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static set [() => { }](v) {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[() => { }],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
c[() => { }] = 1,
|
||||
1
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[() => { }],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[() => { }] = 1,
|
||||
1
|
||||
);
|
@ -0,0 +1,77 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-assignment.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
get [x = 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [x = 1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [x = 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [x = 1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x = 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[x = 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[x = 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x = 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,77 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-bitwise-or.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression bitwise or (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
get [x |= 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [x |= 1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [x |= 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [x |= 1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x |= 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[x |= 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[x |= 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x |= 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,77 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-coalesce.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression coalesce (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = null;
|
||||
|
||||
|
||||
let C = class {
|
||||
get [x ??= 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [x ??= 1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [x ??= 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [x ??= 1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x ??= 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[x ??= 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[x ??= 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x ??= 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,77 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-logical-and.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression logical and (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
get [x &&= 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [x &&= 1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [x &&= 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [x &&= 1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x &&= 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[x &&= 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[x &&= 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x &&= 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 0);
|
@ -0,0 +1,77 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-logical-or.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression logical or (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
get [x ||= 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [x ||= 1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [x ||= 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [x ||= 1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x ||= 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[x ||= 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[x ||= 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x ||= 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-async-arrow-function-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from function expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [async () => {}]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
set [async () => {}](v) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static get [async () => {}]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static set [async () => {}](v) {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[async () => {}],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
c[async () => {}] = 1,
|
||||
1
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[async () => {}],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[async () => {}] = 1,
|
||||
1
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-condition-expression-false.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [false ? 1 : 2]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
set [false ? 1 : 2](v) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static get [false ? 1 : 2]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static set [false ? 1 : 2](v) {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[false ? 1 : 2],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
c[false ? 1 : 2] = 1,
|
||||
1
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[false ? 1 : 2],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[false ? 1 : 2] = 1,
|
||||
1
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-condition-expression-true.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [true ? 1 : 2]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [true ? 1 : 2](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [true ? 1 : 2]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [true ? 1 : 2](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[true ? 1 : 2],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[true ? 1 : 2] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[true ? 1 : 2],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[true ? 1 : 2] = 2,
|
||||
2
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-decimal-e-notational-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from decimal e notational literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [1.e1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [1.e1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [1.e1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [1.e1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1.e1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[1.e1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[1.e1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1.e1] = 2,
|
||||
2
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-decimal-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from decimal literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [1.1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [1.1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [1.1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [1.1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1.1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[1.1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[1.1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1.1] = 2,
|
||||
2
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-exponetiation-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from exponentiation expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [2 ** 2]() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
set [2 ** 2](v) {
|
||||
return 4;
|
||||
}
|
||||
|
||||
static get [2 ** 2]() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
static set [2 ** 2](v) {
|
||||
return 4;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[2 ** 2],
|
||||
4
|
||||
);
|
||||
assert.sameValue(
|
||||
c[2 ** 2] = 4,
|
||||
4
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[2 ** 2],
|
||||
4
|
||||
);
|
||||
assert.sameValue(
|
||||
C[2 ** 2] = 4,
|
||||
4
|
||||
);
|
@ -0,0 +1,77 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-expression-coalesce.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from coalesce (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x;
|
||||
|
||||
|
||||
let C = class {
|
||||
get [x ?? 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [x ?? 1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [x ?? 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [x ?? 1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x ?? 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[x ?? 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[x ?? 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x ?? 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, undefined);
|
@ -0,0 +1,77 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-expression-logical-and.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from logical and (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
get [x && 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [x && 1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [x && 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [x && 1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x && 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[x && 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[x && 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x && 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 0);
|
@ -0,0 +1,77 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-expression-logical-or.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from logical or (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
get [x || 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [x || 1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [x || 1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [x || 1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x || 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[x || 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[x || 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x || 1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 0);
|
@ -0,0 +1,75 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-function-declaration.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from function (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
function f() {}
|
||||
|
||||
|
||||
let C = class {
|
||||
get [f()]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
set [f()](v) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static get [f()]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static set [f()](v) {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[f()],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
c[f()] = 1,
|
||||
1
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[f()],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[f()] = 1,
|
||||
1
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-function-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from function expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [function () {}]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
set [function () {}](v) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static get [function () {}]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static set [function () {}](v) {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[function () {}],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
c[function () {}] = 1,
|
||||
1
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[function () {}],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[function () {}] = 1,
|
||||
1
|
||||
);
|
@ -0,0 +1,75 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-generator-function-declaration.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from generator function (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
function * g() { return 1; }
|
||||
|
||||
|
||||
let C = class {
|
||||
get [g()]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
set [g()](v) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static get [g()]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static set [g()](v) {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[g()],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
c[g()] = 1,
|
||||
1
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[g()],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[g()] = 1,
|
||||
1
|
||||
);
|
@ -0,0 +1,76 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-identifier.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from string literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 1;
|
||||
|
||||
|
||||
|
||||
let C = class {
|
||||
get [x]() {
|
||||
return '2';
|
||||
}
|
||||
|
||||
set [x](v) {
|
||||
return '2';
|
||||
}
|
||||
|
||||
static get [x]() {
|
||||
return '2';
|
||||
}
|
||||
|
||||
static set [x](v) {
|
||||
return '2';
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x],
|
||||
'2'
|
||||
);
|
||||
assert.sameValue(
|
||||
c[x] = '2',
|
||||
'2'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[x],
|
||||
'2'
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x] = '2',
|
||||
'2'
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-integer-e-notational-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from numeric literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1] = 2,
|
||||
2
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-integer-separators.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from integer with separators (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [1_2_3_4_5_6_7_8]() {
|
||||
return 1_2_3_4_5_6_7_8;
|
||||
}
|
||||
|
||||
set [1_2_3_4_5_6_7_8](v) {
|
||||
return 1_2_3_4_5_6_7_8;
|
||||
}
|
||||
|
||||
static get [1_2_3_4_5_6_7_8]() {
|
||||
return 1_2_3_4_5_6_7_8;
|
||||
}
|
||||
|
||||
static set [1_2_3_4_5_6_7_8](v) {
|
||||
return 1_2_3_4_5_6_7_8;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1_2_3_4_5_6_7_8],
|
||||
1_2_3_4_5_6_7_8
|
||||
);
|
||||
assert.sameValue(
|
||||
c[1_2_3_4_5_6_7_8] = 1_2_3_4_5_6_7_8,
|
||||
1_2_3_4_5_6_7_8
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[1_2_3_4_5_6_7_8],
|
||||
1_2_3_4_5_6_7_8
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1_2_3_4_5_6_7_8] = 1_2_3_4_5_6_7_8,
|
||||
1_2_3_4_5_6_7_8
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-math.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from math (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [1 + 2 - 3 * 4 / 5 ** 6]() {
|
||||
return 2.999232;
|
||||
}
|
||||
|
||||
set [1 + 2 - 3 * 4 / 5 ** 6](v) {
|
||||
return 2.999232;
|
||||
}
|
||||
|
||||
static get [1 + 2 - 3 * 4 / 5 ** 6]() {
|
||||
return 2.999232;
|
||||
}
|
||||
|
||||
static set [1 + 2 - 3 * 4 / 5 ** 6](v) {
|
||||
return 2.999232;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 + 2 - 3 * 4 / 5 ** 6],
|
||||
2.999232
|
||||
);
|
||||
assert.sameValue(
|
||||
c[1 + 2 - 3 * 4 / 5 ** 6] = 2.999232,
|
||||
2.999232
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[1 + 2 - 3 * 4 / 5 ** 6],
|
||||
2.999232
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 + 2 - 3 * 4 / 5 ** 6] = 2.999232,
|
||||
2.999232
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-multiplicative-expression-div.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from multiplicative expression "divide" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [1 / 1]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
set [1 / 1](v) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static get [1 / 1]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static set [1 / 1](v) {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 / 1],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
c[1 / 1] = 1,
|
||||
1
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[1 / 1],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 / 1] = 1,
|
||||
1
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-multiplicative-expression-mult.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from multiplicative expression "multiply" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [1 * 1]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
set [1 * 1](v) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static get [1 * 1]() {
|
||||
return 1;
|
||||
}
|
||||
|
||||
static set [1 * 1](v) {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 * 1],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
c[1 * 1] = 1,
|
||||
1
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[1 * 1],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 * 1] = 1,
|
||||
1
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-numeric-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from numeric literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [1](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [1]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [1](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[1] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1] = 2,
|
||||
2
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-string-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from string literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get ['1']() {
|
||||
return '2';
|
||||
}
|
||||
|
||||
set ['1'](v) {
|
||||
return '2';
|
||||
}
|
||||
|
||||
static get ['1']() {
|
||||
return '2';
|
||||
}
|
||||
|
||||
static set ['1'](v) {
|
||||
return '2';
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c['1'],
|
||||
'2'
|
||||
);
|
||||
assert.sameValue(
|
||||
c['1'] = '2',
|
||||
'2'
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C['1'],
|
||||
'2'
|
||||
);
|
||||
assert.sameValue(
|
||||
C['1'] = '2',
|
||||
'2'
|
||||
);
|
@ -0,0 +1,74 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-yield-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression-accessors.template
|
||||
/*---
|
||||
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
get [true ? 1 : 2]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
set [true ? 1 : 2](v) {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static get [true ? 1 : 2]() {
|
||||
return 2;
|
||||
}
|
||||
|
||||
static set [true ? 1 : 2](v) {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[true ? 1 : 2],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
c[true ? 1 : 2] = 2,
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(
|
||||
C[true ? 1 : 2],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[true ? 1 : 2] = 2,
|
||||
2
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-additive-expression-add.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from additive expression "add" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1 + 1]() {
|
||||
return 2;
|
||||
}
|
||||
static [1 + 1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 + 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 + 1](),
|
||||
2
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-additive-expression-subtract.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from additive expression "subtract" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1 - 1]() {
|
||||
return 0;
|
||||
}
|
||||
static [1 - 1]() {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 - 1](),
|
||||
0
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 - 1](),
|
||||
0
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-arrow-function-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from arrow function (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[() => { }]() {
|
||||
return 1;
|
||||
}
|
||||
static [() => { }]() {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[() => { }](),
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[() => { }](),
|
||||
1
|
||||
);
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-assignment.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x = 1]() {
|
||||
return 2;
|
||||
}
|
||||
static [x = 1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x = 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x = 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-bitwise-or.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression bitwise or (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x |= 1]() {
|
||||
return 2;
|
||||
}
|
||||
static [x |= 1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x |= 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x |= 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-coalesce.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression coalesce (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = null;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x ??= 1]() {
|
||||
return 2;
|
||||
}
|
||||
static [x ??= 1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x ??= 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x ??= 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-logical-and.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression logical and (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x &&= 1]() {
|
||||
return 2;
|
||||
}
|
||||
static [x &&= 1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x &&= 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x &&= 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 0);
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-logical-or.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression logical or (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x ||= 1]() {
|
||||
return 2;
|
||||
}
|
||||
static [x ||= 1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x ||= 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x ||= 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-async-arrow-function-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from function expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[async () => {}]() {
|
||||
return 1;
|
||||
}
|
||||
static [async () => {}]() {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[async () => {}](),
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[async () => {}](),
|
||||
1
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-condition-expression-false.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[false ? 1 : 2]() {
|
||||
return 1;
|
||||
}
|
||||
static [false ? 1 : 2]() {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[false ? 1 : 2](),
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[false ? 1 : 2](),
|
||||
1
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-condition-expression-true.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[true ? 1 : 2]() {
|
||||
return 2;
|
||||
}
|
||||
static [true ? 1 : 2]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[true ? 1 : 2](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[true ? 1 : 2](),
|
||||
2
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-decimal-e-notational-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from decimal e notational literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1.e1]() {
|
||||
return 2;
|
||||
}
|
||||
static [1.e1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1.e1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1.e1](),
|
||||
2
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-decimal-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from decimal literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1.1]() {
|
||||
return 2;
|
||||
}
|
||||
static [1.1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1.1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1.1](),
|
||||
2
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-exponetiation-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from exponentiation expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[2 ** 2]() {
|
||||
return 4;
|
||||
}
|
||||
static [2 ** 2]() {
|
||||
return 4;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[2 ** 2](),
|
||||
4
|
||||
);
|
||||
assert.sameValue(
|
||||
C[2 ** 2](),
|
||||
4
|
||||
);
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-expression-coalesce.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from coalesce (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x ?? 1]() {
|
||||
return 2;
|
||||
}
|
||||
static [x ?? 1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x ?? 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x ?? 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, undefined);
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-expression-logical-and.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from logical and (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x && 1]() {
|
||||
return 2;
|
||||
}
|
||||
static [x && 1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x && 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x && 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 0);
|
@ -0,0 +1,59 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-expression-logical-or.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from logical or (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x || 1]() {
|
||||
return 2;
|
||||
}
|
||||
static [x || 1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x || 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x || 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 0);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-function-declaration.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from function (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
function f() {}
|
||||
|
||||
|
||||
let C = class {
|
||||
[f()]() {
|
||||
return 1;
|
||||
}
|
||||
static [f()]() {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[f()](),
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[f()](),
|
||||
1
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-function-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from function expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[function () {}]() {
|
||||
return 1;
|
||||
}
|
||||
static [function () {}]() {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[function () {}](),
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[function () {}](),
|
||||
1
|
||||
);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-generator-function-declaration.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from generator function (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
function * g() { return 1; }
|
||||
|
||||
|
||||
let C = class {
|
||||
[g()]() {
|
||||
return 1;
|
||||
}
|
||||
static [g()]() {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[g()](),
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[g()](),
|
||||
1
|
||||
);
|
@ -0,0 +1,58 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-identifier.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from string literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 1;
|
||||
|
||||
|
||||
|
||||
let C = class {
|
||||
[x]() {
|
||||
return '2';
|
||||
}
|
||||
static [x]() {
|
||||
return '2';
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x](),
|
||||
'2'
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x](),
|
||||
'2'
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-integer-e-notational-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from numeric literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1]() {
|
||||
return 2;
|
||||
}
|
||||
static [1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1](),
|
||||
2
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-integer-separators.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from integer with separators (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1_2_3_4_5_6_7_8]() {
|
||||
return 1_2_3_4_5_6_7_8;
|
||||
}
|
||||
static [1_2_3_4_5_6_7_8]() {
|
||||
return 1_2_3_4_5_6_7_8;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1_2_3_4_5_6_7_8](),
|
||||
1_2_3_4_5_6_7_8
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1_2_3_4_5_6_7_8](),
|
||||
1_2_3_4_5_6_7_8
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-math.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from math (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1 + 2 - 3 * 4 / 5 ** 6]() {
|
||||
return 2.999232;
|
||||
}
|
||||
static [1 + 2 - 3 * 4 / 5 ** 6]() {
|
||||
return 2.999232;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 + 2 - 3 * 4 / 5 ** 6](),
|
||||
2.999232
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 + 2 - 3 * 4 / 5 ** 6](),
|
||||
2.999232
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-multiplicative-expression-div.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from multiplicative expression "divide" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1 / 1]() {
|
||||
return 1;
|
||||
}
|
||||
static [1 / 1]() {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 / 1](),
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 / 1](),
|
||||
1
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-multiplicative-expression-mult.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from multiplicative expression "multiply" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1 * 1]() {
|
||||
return 1;
|
||||
}
|
||||
static [1 * 1]() {
|
||||
return 1;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 * 1](),
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 * 1](),
|
||||
1
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-numeric-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from numeric literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1]() {
|
||||
return 2;
|
||||
}
|
||||
static [1]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1](),
|
||||
2
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-string-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from string literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
['1']() {
|
||||
return '2';
|
||||
}
|
||||
static ['1']() {
|
||||
return '2';
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c['1'](),
|
||||
'2'
|
||||
);
|
||||
assert.sameValue(
|
||||
C['1'](),
|
||||
'2'
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-yield-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression.template
|
||||
/*---
|
||||
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[true ? 1 : 2]() {
|
||||
return 2;
|
||||
}
|
||||
static [true ? 1 : 2]() {
|
||||
return 2;
|
||||
}
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[true ? 1 : 2](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[true ? 1 : 2](),
|
||||
2
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-additive-expression-add.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from additive expression "add" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1 + 1] = 2;
|
||||
|
||||
static [1 + 1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 + 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 + 1],
|
||||
2
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-additive-expression-subtract.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from additive expression "subtract" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1 - 1] = 0;
|
||||
|
||||
static [1 - 1] = 0;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 - 1],
|
||||
0
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 - 1],
|
||||
0
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-arrow-function-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from arrow function (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[() => { }] = 1;
|
||||
|
||||
static [() => { }] = 1;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[() => { }],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[() => { }],
|
||||
1
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-assignment.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x = 1] = 2;
|
||||
|
||||
static [x = 1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x = 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x = 1],
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-bitwise-or.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression bitwise or (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x |= 1] = 2;
|
||||
|
||||
static [x |= 1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x |= 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x |= 1],
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-coalesce.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression coalesce (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = null;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x ??= 1] = 2;
|
||||
|
||||
static [x ??= 1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x ??= 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x ??= 1],
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-logical-and.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression logical and (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x &&= 1] = 2;
|
||||
|
||||
static [x &&= 1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x &&= 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x &&= 1],
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 0);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-logical-or.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression logical or (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x ||= 1] = 2;
|
||||
|
||||
static [x ||= 1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x ||= 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x ||= 1],
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-async-arrow-function-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from function expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[async () => {}] = 1;
|
||||
|
||||
static [async () => {}] = 1;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[async () => {}],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[async () => {}],
|
||||
1
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-condition-expression-false.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[false ? 1 : 2] = 1;
|
||||
|
||||
static [false ? 1 : 2] = 1;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[false ? 1 : 2],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[false ? 1 : 2],
|
||||
1
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-condition-expression-true.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[true ? 1 : 2] = 2;
|
||||
|
||||
static [true ? 1 : 2] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[true ? 1 : 2],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[true ? 1 : 2],
|
||||
2
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-decimal-e-notational-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from decimal e notational literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1.e1] = 2;
|
||||
|
||||
static [1.e1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1.e1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1.e1],
|
||||
2
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-decimal-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from decimal literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1.1] = 2;
|
||||
|
||||
static [1.1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1.1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1.1],
|
||||
2
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-exponetiation-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from exponentiation expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[2 ** 2] = 4;
|
||||
|
||||
static [2 ** 2] = 4;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[2 ** 2],
|
||||
4
|
||||
);
|
||||
assert.sameValue(
|
||||
C[2 ** 2],
|
||||
4
|
||||
);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-expression-coalesce.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from coalesce (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x ?? 1] = 2;
|
||||
|
||||
static [x ?? 1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x ?? 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x ?? 1],
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, undefined);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-expression-logical-and.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from logical and (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x && 1] = 2;
|
||||
|
||||
static [x && 1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x && 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x && 1],
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 0);
|
@ -0,0 +1,56 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-expression-logical-or.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from logical or (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x || 1] = 2;
|
||||
|
||||
static [x || 1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x || 1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x || 1],
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 0);
|
@ -0,0 +1,54 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-function-declaration.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from function (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
function f() {}
|
||||
|
||||
|
||||
let C = class {
|
||||
[f()] = 1;
|
||||
|
||||
static [f()] = 1;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[f()],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[f()],
|
||||
1
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-function-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from function expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[function () {}] = 1;
|
||||
|
||||
static [function () {}] = 1;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[function () {}],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[function () {}],
|
||||
1
|
||||
);
|
@ -0,0 +1,54 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-generator-function-declaration.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from generator function (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
function * g() { return 1; }
|
||||
|
||||
|
||||
let C = class {
|
||||
[g()] = 1;
|
||||
|
||||
static [g()] = 1;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[g()],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[g()],
|
||||
1
|
||||
);
|
@ -0,0 +1,55 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-identifier.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from string literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 1;
|
||||
|
||||
|
||||
|
||||
let C = class {
|
||||
[x] = '2';
|
||||
|
||||
static [x] = '2';
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x],
|
||||
'2'
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x],
|
||||
'2'
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-integer-e-notational-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from numeric literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1] = 2;
|
||||
|
||||
static [1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1],
|
||||
2
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-integer-separators.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from integer with separators (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1_2_3_4_5_6_7_8] = 1_2_3_4_5_6_7_8;
|
||||
|
||||
static [1_2_3_4_5_6_7_8] = 1_2_3_4_5_6_7_8;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1_2_3_4_5_6_7_8],
|
||||
1_2_3_4_5_6_7_8
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1_2_3_4_5_6_7_8],
|
||||
1_2_3_4_5_6_7_8
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-math.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from math (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1 + 2 - 3 * 4 / 5 ** 6] = 2.999232;
|
||||
|
||||
static [1 + 2 - 3 * 4 / 5 ** 6] = 2.999232;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 + 2 - 3 * 4 / 5 ** 6],
|
||||
2.999232
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 + 2 - 3 * 4 / 5 ** 6],
|
||||
2.999232
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-multiplicative-expression-div.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from multiplicative expression "divide" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1 / 1] = 1;
|
||||
|
||||
static [1 / 1] = 1;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 / 1],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 / 1],
|
||||
1
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-multiplicative-expression-mult.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from multiplicative expression "multiply" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1 * 1] = 1;
|
||||
|
||||
static [1 * 1] = 1;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 * 1],
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 * 1],
|
||||
1
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-numeric-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from numeric literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1] = 2;
|
||||
|
||||
static [1] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1],
|
||||
2
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-string-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from string literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
['1'] = '2';
|
||||
|
||||
static ['1'] = '2';
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c['1'],
|
||||
'2'
|
||||
);
|
||||
assert.sameValue(
|
||||
C['1'],
|
||||
'2'
|
||||
);
|
@ -0,0 +1,53 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-yield-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields.template
|
||||
/*---
|
||||
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[true ? 1 : 2] = 2;
|
||||
|
||||
static [true ? 1 : 2] = 2;
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[true ? 1 : 2],
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[true ? 1 : 2],
|
||||
2
|
||||
);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-additive-expression-add.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from additive expression "add" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1 + 1] = () => {
|
||||
return 2;
|
||||
};
|
||||
|
||||
static [1 + 1] = () => {
|
||||
return 2;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 + 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 + 1](),
|
||||
2
|
||||
);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-additive-expression-subtract.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from additive expression "subtract" (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1 - 1] = () => {
|
||||
return 0;
|
||||
};
|
||||
|
||||
static [1 - 1] = () => {
|
||||
return 0;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1 - 1](),
|
||||
0
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1 - 1](),
|
||||
0
|
||||
);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-arrow-function-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from arrow function (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[() => { }] = () => {
|
||||
return 1;
|
||||
};
|
||||
|
||||
static [() => { }] = () => {
|
||||
return 1;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[() => { }](),
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[() => { }](),
|
||||
1
|
||||
);
|
@ -0,0 +1,60 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-assignment.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x = 1] = () => {
|
||||
return 2;
|
||||
};
|
||||
|
||||
static [x = 1] = () => {
|
||||
return 2;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x = 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x = 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,60 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-bitwise-or.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression bitwise or (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x |= 1] = () => {
|
||||
return 2;
|
||||
};
|
||||
|
||||
static [x |= 1] = () => {
|
||||
return 2;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x |= 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x |= 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,60 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-coalesce.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression coalesce (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = null;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x ??= 1] = () => {
|
||||
return 2;
|
||||
};
|
||||
|
||||
static [x ??= 1] = () => {
|
||||
return 2;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x ??= 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x ??= 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,60 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-logical-and.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression logical and (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x &&= 1] = () => {
|
||||
return 2;
|
||||
};
|
||||
|
||||
static [x &&= 1] = () => {
|
||||
return 2;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x &&= 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x &&= 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 0);
|
@ -0,0 +1,60 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-assignment-expression-logical-or.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from assignment expression logical or (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
let x = 0;
|
||||
|
||||
|
||||
let C = class {
|
||||
[x ||= 1] = () => {
|
||||
return 2;
|
||||
};
|
||||
|
||||
static [x ||= 1] = () => {
|
||||
return 2;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[x ||= 1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[x ||= 1](),
|
||||
2
|
||||
);
|
||||
|
||||
assert.sameValue(x, 1);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-async-arrow-function-expression.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from function expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[async () => {}] = () => {
|
||||
return 1;
|
||||
};
|
||||
|
||||
static [async () => {}] = () => {
|
||||
return 1;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[async () => {}](),
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[async () => {}](),
|
||||
1
|
||||
);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-condition-expression-false.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[false ? 1 : 2] = () => {
|
||||
return 1;
|
||||
};
|
||||
|
||||
static [false ? 1 : 2] = () => {
|
||||
return 1;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[false ? 1 : 2](),
|
||||
1
|
||||
);
|
||||
assert.sameValue(
|
||||
C[false ? 1 : 2](),
|
||||
1
|
||||
);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-condition-expression-true.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[true ? 1 : 2] = () => {
|
||||
return 2;
|
||||
};
|
||||
|
||||
static [true ? 1 : 2] = () => {
|
||||
return 2;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[true ? 1 : 2](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[true ? 1 : 2](),
|
||||
2
|
||||
);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-decimal-e-notational-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from decimal e notational literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1.e1] = () => {
|
||||
return 2;
|
||||
};
|
||||
|
||||
static [1.e1] = () => {
|
||||
return 2;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1.e1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1.e1](),
|
||||
2
|
||||
);
|
@ -0,0 +1,57 @@
|
||||
// This file was procedurally generated from the following sources:
|
||||
// - src/computed-property-names/computed-property-name-from-decimal-literal.case
|
||||
// - src/computed-property-names/evaluation/class-expression-fields-methods.template
|
||||
/*---
|
||||
description: Computed property name from decimal literal (ComputedPropertyName in ClassExpression)
|
||||
esid: prod-ComputedPropertyName
|
||||
features: [computed-property-names]
|
||||
flags: [generated]
|
||||
info: |
|
||||
ClassExpression:
|
||||
classBindingIdentifier opt ClassTail
|
||||
|
||||
ClassTail:
|
||||
ClassHeritage opt { ClassBody opt }
|
||||
|
||||
ClassBody:
|
||||
ClassElementList
|
||||
|
||||
ClassElementList:
|
||||
ClassElement
|
||||
|
||||
ClassElement:
|
||||
MethodDefinition
|
||||
|
||||
MethodDefinition:
|
||||
PropertyName ...
|
||||
get PropertyName ...
|
||||
set PropertyName ...
|
||||
|
||||
PropertyName:
|
||||
ComputedPropertyName
|
||||
|
||||
ComputedPropertyName:
|
||||
[ AssignmentExpression ]
|
||||
---*/
|
||||
|
||||
|
||||
let C = class {
|
||||
[1.1] = () => {
|
||||
return 2;
|
||||
};
|
||||
|
||||
static [1.1] = () => {
|
||||
return 2;
|
||||
};
|
||||
};
|
||||
|
||||
let c = new C();
|
||||
|
||||
assert.sameValue(
|
||||
c[1.1](),
|
||||
2
|
||||
);
|
||||
assert.sameValue(
|
||||
C[1.1](),
|
||||
2
|
||||
);
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user