tor-browser

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

await-using-declaring-let-split-across-two-lines.js (888B)


      1 // |reftest| shell-option(--enable-explicit-resource-management) skip-if(!(this.hasOwnProperty('getBuildConfiguration')&&getBuildConfiguration('explicit-resource-management'))||!xulRuntime.shell) async -- explicit-resource-management is not enabled unconditionally, requires shell-options
      2 // Copyright (C) 2023 Ron Buckton. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-let-const-using-and-await-using-declarations
      7 description: >
      8    await using: |await using let| split across two lines is treated as two statements.
      9 info: |
     10  Lexical declarations may not declare a binding named "let".
     11 flags: [noStrict, async]
     12 includes: [asyncHelpers.js]
     13 features: [explicit-resource-management]
     14 ---*/
     15 
     16 asyncTest(async function () {
     17  await using
     18  let = "irrelevant initializer";
     19 
     20  assert(typeof let === "string");
     21  var using, let;
     22 });