tor-browser

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

S12.8_A5_T1.js (781B)


      1 // |reftest| error:SyntaxError
      2 // Copyright 2009 the Sputnik authors.  All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 info: |
      7    Identifier must be label in the label set of an enclosing (but not
      8    crossing function boundaries) IterationStatement
      9 es5id: 12.8_A5_T1
     10 description: Checking if breaking another labeled loop fails
     11 negative:
     12  phase: parse
     13  type: SyntaxError
     14 ---*/
     15 
     16 $DONOTEVALUATE();
     17 
     18 (function(){
     19    LABEL_OUT : var x=0, y=0;
     20    LABEL_DO_LOOP : do {
     21        LABEL_IN : x++;
     22        if(x===10)
     23            return;
     24        break LABEL_ANOTHER_LOOP;
     25        LABEL_IN_2 : y++;
     26        function IN_DO_FUNC(){}
     27    } while(0);
     28 
     29    LABEL_ANOTHER_LOOP : do {
     30        ;
     31    } while(0);
     32 
     33    function OUT_FUNC(){}
     34 })();