-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
548 additions
and
0 deletions.
There are no files selected for viewing
74 changes: 74 additions & 0 deletions
74
...xpressions/class/cpn-class-expr-accessors-computed-property-name-from-await-expression.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/computed-property-names/computed-property-name-from-await-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, top-level-await] | ||
flags: [generated, module] | ||
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 [await 9]() { | ||
return 9; | ||
} | ||
|
||
set [await 9](v) { | ||
return 9; | ||
} | ||
|
||
static get [await 9]() { | ||
return 9; | ||
} | ||
|
||
static set [await 9](v) { | ||
return 9; | ||
} | ||
}; | ||
|
||
let c = new C(); | ||
|
||
assert.sameValue( | ||
c[await 9], | ||
9 | ||
); | ||
assert.sameValue( | ||
c[await 9] = 9, | ||
9 | ||
); | ||
|
||
assert.sameValue( | ||
C[await 9], | ||
9 | ||
); | ||
assert.sameValue( | ||
C[await 9] = 9, | ||
9 | ||
); |
56 changes: 56 additions & 0 deletions
56
...language/expressions/class/cpn-class-expr-computed-property-name-from-await-expression.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/computed-property-names/computed-property-name-from-await-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, top-level-await] | ||
flags: [generated, module] | ||
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 { | ||
[await 9]() { | ||
return 9; | ||
} | ||
static [await 9]() { | ||
return 9; | ||
} | ||
}; | ||
|
||
let c = new C(); | ||
|
||
assert.sameValue( | ||
c[await 9](), | ||
9 | ||
); | ||
assert.sameValue( | ||
C[await 9](), | ||
9 | ||
); |
53 changes: 53 additions & 0 deletions
53
...e/expressions/class/cpn-class-expr-fields-computed-property-name-from-await-expression.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/computed-property-names/computed-property-name-from-await-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, top-level-await] | ||
flags: [generated, module] | ||
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 { | ||
[await 9] = 9; | ||
|
||
static [await 9] = 9; | ||
}; | ||
|
||
let c = new C(); | ||
|
||
assert.sameValue( | ||
c[await 9], | ||
9 | ||
); | ||
assert.sameValue( | ||
C[await 9], | ||
9 | ||
); |
57 changes: 57 additions & 0 deletions
57
...sions/class/cpn-class-expr-fields-methods-computed-property-name-from-await-expression.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/computed-property-names/computed-property-name-from-await-expression.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, top-level-await] | ||
flags: [generated, module] | ||
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 { | ||
[await 9] = () => { | ||
return 9; | ||
}; | ||
|
||
static [await 9] = () => { | ||
return 9; | ||
}; | ||
}; | ||
|
||
let c = new C(); | ||
|
||
assert.sameValue( | ||
c[await 9](), | ||
9 | ||
); | ||
assert.sameValue( | ||
C[await 9](), | ||
9 | ||
); |
34 changes: 34 additions & 0 deletions
34
test/language/expressions/object/cpn-obj-lit-computed-property-name-from-await-expression.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/computed-property-names/computed-property-name-from-await-expression.case | ||
// - src/computed-property-names/evaluation/object-literal.template | ||
/*--- | ||
description: Computed property name from condition expression (ComputedPropertyName in ObjectLiteral) | ||
esid: prod-ComputedPropertyName | ||
features: [computed-property-names, top-level-await] | ||
flags: [generated, module] | ||
info: | | ||
ObjectLiteral: | ||
{ PropertyDefinitionList } | ||
PropertyDefinitionList: | ||
PropertyDefinition | ||
PropertyDefinition: | ||
PropertyName: AssignmentExpression | ||
PropertyName: | ||
ComputedPropertyName | ||
ComputedPropertyName: | ||
[ AssignmentExpression ] | ||
---*/ | ||
|
||
|
||
let o = { | ||
[await 9]: 9 | ||
}; | ||
|
||
assert.sameValue( | ||
o[await 9], | ||
9 | ||
); |
34 changes: 34 additions & 0 deletions
34
...anguage/expressions/object/cpn-yield-expr-computed-property-name-from-await-expression.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/computed-property-names/computed-property-name-from-await-expression.case | ||
// - src/computed-property-names/evaluation/yield-expression.template | ||
/*--- | ||
description: Computed property name from condition expression (ComputedPropertyName in ObjectLiteral) | ||
esid: prod-ComputedPropertyName | ||
features: [computed-property-names, top-level-await] | ||
flags: [generated, module] | ||
info: | | ||
ObjectLiteral: | ||
{ PropertyDefinitionList } | ||
PropertyDefinitionList: | ||
PropertyDefinition | ||
PropertyDefinition: | ||
PropertyName: AssignmentExpression | ||
PropertyName: | ||
ComputedPropertyName | ||
ComputedPropertyName: | ||
[ AssignmentExpression ] | ||
---*/ | ||
|
||
|
||
let o = { | ||
[await 9]: 9 | ||
}; | ||
|
||
assert.sameValue( | ||
o[await 9], | ||
9 | ||
); |
74 changes: 74 additions & 0 deletions
74
...statements/class/cpn-class-decl-accessors-computed-property-name-from-await-expression.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
// This file was procedurally generated from the following sources: | ||
// - src/computed-property-names/computed-property-name-from-await-expression.case | ||
// - src/computed-property-names/evaluation/class-declaration-accessors.template | ||
/*--- | ||
description: Computed property name from condition expression (ComputedPropertyName in ClassDeclaration) | ||
esid: prod-ComputedPropertyName | ||
features: [computed-property-names, top-level-await] | ||
flags: [generated, module] | ||
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 ] | ||
---*/ | ||
|
||
|
||
class C { | ||
get [await 9]() { | ||
return 9; | ||
} | ||
|
||
set [await 9](v) { | ||
return 9; | ||
} | ||
|
||
static get [await 9]() { | ||
return 9; | ||
} | ||
|
||
static set [await 9](v) { | ||
return 9; | ||
} | ||
}; | ||
|
||
let c = new C(); | ||
|
||
assert.sameValue( | ||
c[await 9], | ||
9 | ||
); | ||
assert.sameValue( | ||
c[await 9] = 9, | ||
9 | ||
); | ||
|
||
assert.sameValue( | ||
C[await 9], | ||
9 | ||
); | ||
assert.sameValue( | ||
C[await 9] = 9, | ||
9 | ||
); |
Oops, something went wrong.