tor-browser

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

early-catch-function.js (656B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2018 André Bargull. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-try-statement-static-semantics-early-errors
      7 description: >
      8  Redeclaration of CatchParameter with directly nested FunctionDeclaration in function context.
      9 info: |
     10  13.15.1 Static Semantics: Early Errors
     11 
     12  It is a Syntax Error if any element of the BoundNames of CatchParameter also
     13  occurs in the LexicallyDeclaredNames of Block.
     14 negative:
     15  phase: parse
     16  type: SyntaxError
     17 ---*/
     18 
     19 $DONOTEVALUATE();
     20 
     21 function f() {
     22    try {
     23    } catch (e) {
     24        function e(){}
     25    }
     26 }