tor-browser

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

with-initializer-if-expression-statement.js (744B)


      1 // |reftest| shell-option(--enable-explicit-resource-management) skip-if(!(this.hasOwnProperty('getBuildConfiguration')&&getBuildConfiguration('explicit-resource-management'))||!xulRuntime.shell) error:SyntaxError -- 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-if-statement
      7 description: >
      8    await using declarations with initialisers in statement positions:
      9    if ( Expression ) Statement
     10 negative:
     11  phase: parse
     12  type: SyntaxError
     13 features: [explicit-resource-management]
     14 ---*/
     15 
     16 $DONOTEVALUATE();
     17 async function f() {
     18  if (true) await using x = null;
     19 }