tor-browser

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

cpn-class-expr-fields-computed-property-name-from-await-expression.js (1293B)


      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/class-expression-fields.template
      5 /*---
      6 description: Computed property name from condition expression (ComputedPropertyName in ClassExpression)
      7 esid: prod-ComputedPropertyName
      8 features: [computed-property-names, top-level-await, class-fields-public, class-static-fields-public]
      9 flags: [generated, async, module]
     10 info: |
     11    ClassExpression:
     12      classBindingIdentifier opt ClassTail
     13 
     14    ClassTail:
     15      ClassHeritage opt { ClassBody opt }
     16 
     17    ClassBody:
     18      ClassElementList
     19 
     20    ClassElementList:
     21      ClassElement
     22 
     23    ClassElement:
     24      MethodDefinition
     25 
     26    MethodDefinition:
     27      PropertyName ...
     28      get PropertyName ...
     29      set PropertyName ...
     30 
     31    PropertyName:
     32      ComputedPropertyName
     33 
     34    ComputedPropertyName:
     35      [ AssignmentExpression ]
     36 ---*/
     37 try {
     38 
     39 
     40 let C = class {
     41  [await 9] = 9;
     42 
     43  static [await 9] = 9;
     44 };
     45 
     46 let c = new C();
     47 
     48 assert.sameValue(
     49  c[await 9],
     50  9
     51 );
     52 assert.sameValue(
     53  C[await 9],
     54  9
     55 );
     56 assert.sameValue(
     57  c[String(await 9)],
     58  9
     59 );
     60 assert.sameValue(
     61  C[String(await 9)],
     62  9
     63 );
     64 
     65 } catch (e) {
     66  $DONE(e);
     67 }
     68 $DONE();