tor-browser

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

static-init-invalid-undefined-break-target.js (657B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2021 the V8 project authors. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 /*---
      5 esid: sec-class-definitions-static-semantics-early-errors
      6 description: Block cannot reference an undefined `break` target
      7 info: |
      8  ClassStaticBlockBody : ClassStaticBlockStatementList
      9 
     10  - It is a Syntax Error if ContainsUndefinedBreakTarget of
     11    ClassStaticBlockStatementList with argument « » is true.
     12 negative:
     13  phase: parse
     14  type: SyntaxError
     15 features: [class-static-block]
     16 ---*/
     17 
     18 $DONOTEVALUATE();
     19 
     20 class C {
     21  static {
     22    x: while (false) {
     23      break y;
     24    }
     25  }
     26 }