2020-09-25 19:21:51 +02:00
|
|
|
// 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]
|
2020-09-25 19:40:56 +02:00
|
|
|
flags: [generated, async, module]
|
2020-09-25 19:21:51 +02:00
|
|
|
info: |
|
|
|
|
ObjectLiteral:
|
|
|
|
{ PropertyDefinitionList }
|
|
|
|
|
|
|
|
PropertyDefinitionList:
|
|
|
|
PropertyDefinition
|
|
|
|
|
|
|
|
PropertyDefinition:
|
|
|
|
PropertyName: AssignmentExpression
|
|
|
|
|
|
|
|
PropertyName:
|
|
|
|
ComputedPropertyName
|
|
|
|
|
|
|
|
ComputedPropertyName:
|
|
|
|
[ AssignmentExpression ]
|
|
|
|
---*/
|
2020-09-25 19:40:56 +02:00
|
|
|
try {
|
2020-09-25 19:21:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
let o = {
|
|
|
|
[await 9]: 9
|
|
|
|
};
|
|
|
|
|
|
|
|
assert.sameValue(
|
|
|
|
o[await 9],
|
|
|
|
9
|
|
|
|
);
|
2020-09-25 19:40:56 +02:00
|
|
|
assert.sameValue(
|
|
|
|
o[String(await 9)],
|
|
|
|
9
|
|
|
|
);
|
|
|
|
|
|
|
|
} catch (e) {
|
|
|
|
$DONE(e);
|
|
|
|
}
|
|
|
|
$DONE();
|