tor-browser

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

await-void-expr.js (626B)


      1 // |reftest| module async
      2 // Copyright (C) 2019 Leo Balter. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 description: >
      7  AwaitExpression void resolves into undefined
      8 info: |
      9  ModuleItem:
     10    StatementListItem[~Yield, +Await, ~Return]
     11 
     12  ...
     13 
     14  UnaryExpression[Yield, Await]
     15    void UnaryExpression[?Yield, ?Await]
     16    [+Await]AwaitExpression[?Yield]
     17 
     18  AwaitExpression[Yield]:
     19    await UnaryExpression[?Yield, +Await]
     20 esid: prod-AwaitExpression
     21 flags: [module, async]
     22 features: [top-level-await]
     23 ---*/
     24 
     25 var x = await void 1;
     26 
     27 assert.sameValue(x, undefined);
     28 
     29 $DONE();