tor-browser

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

with-initializer-default-statement-list.js (1021B)


      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-let-const-using-and-await-using-declarations-static-semantics-early-errors
      7 description: >
      8    using declarations with initialisers in statement positions:
      9    default : StatementList
     10 info: |
     11  AwaitUsingDeclaration : CoverAwaitExpressionAndAwaitUsingDeclarationHead BindingList ;
     12 
     13  - It is a Syntax Error if AwaitUsingDeclaration is contained directly within the StatementList of either a CaseClause or
     14    DefaultClause.
     15 negative:
     16  phase: parse
     17  type: SyntaxError
     18 features: [explicit-resource-management]
     19 ---*/
     20 $DONOTEVALUATE();
     21 switch (true) { default: using x = null; }