tor-browser

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

param-dflt-yield-expr.js (743B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2016 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-arrow-function-definitions
      6 es6id: 14.2
      7 description: >
      8  The `yield` token is interpreted contextually outside of strict mode
      9 info: |
     10  ArrowFunction[In, Yield] :
     11 
     12    ArrowParameters[?Yield] [no LineTerminator here] => ConciseBody[?In]
     13 
     14  14.2.1 Static Semantics: Early Errors#
     15 
     16  ArrowFunction : ArrowParameters=>ConciseBody
     17 
     18  - It is a Syntax Error if ArrowParameters Contains YieldExpression is true.
     19 features: [generators, default-parameters]
     20 negative:
     21  phase: parse
     22  type: SyntaxError
     23 ---*/
     24 
     25 $DONOTEVALUATE();
     26 
     27 function *g() {
     28  (x = yield) => {};
     29 }