tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

cpn-obj-lit-computed-property-name-from-await-expression.js (923B)


      1 // |reftest| module async
      2 // This file was procedurally generated from the following sources:
      3 // - src/computed-property-names/computed-property-name-from-await-expression.case
      4 // - src/computed-property-names/evaluation/object-literal.template
      5 /*---
      6 description: Computed property name from condition expression (ComputedPropertyName in ObjectLiteral)
      7 esid: prod-ComputedPropertyName
      8 features: [computed-property-names, top-level-await]
      9 flags: [generated, async, module]
     10 info: |
     11    ObjectLiteral:
     12      { PropertyDefinitionList }
     13 
     14    PropertyDefinitionList:
     15      PropertyDefinition
     16 
     17    PropertyDefinition:
     18      PropertyName: AssignmentExpression
     19 
     20    PropertyName:
     21      ComputedPropertyName
     22 
     23    ComputedPropertyName:
     24      [ AssignmentExpression ]
     25 ---*/
     26 try {
     27 
     28 
     29 let o = {
     30  [await 9]: 9
     31 };
     32 
     33 assert.sameValue(
     34  o[await 9],
     35  9
     36 );
     37 assert.sameValue(
     38  o[String(await 9)],
     39  9
     40 );
     41 
     42 } catch (e) {
     43  $DONE(e);
     44 }
     45 $DONE();