tor-browser

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

use-strict-with-non-simple-param.js (636B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2015 André Bargull. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-arrow-function-definitions-static-semantics-early-errors
      7 description: >
      8  A SyntaxError is thrown if an arrow function contains a non-simple parameter list and a UseStrict directive.
      9 info: |
     10  Static Semantics: Early Errors
     11 
     12  It is a Syntax Error if ContainsUseStrict of ConciseBody is true and IsSimpleParameterList of ArrowParameters is false.
     13 negative:
     14  phase: parse
     15  type: SyntaxError
     16 ---*/
     17 
     18 $DONOTEVALUATE();
     19 
     20 var f = (a = 0) => {
     21  "use strict";
     22 };