tor-browser

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

method-param-dflt-yield.js (562B)


      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-method-definitions
      6 es6id: 14.3
      7 description: >
      8  YieldExpression cannot be used within the FormalParameters of a class method
      9 info: |
     10  MethodDefinition[Yield] :
     11 
     12    PropertyName[?Yield] ( StrictFormalParameters ) { FunctionBody }
     13 features: [generators, default-parameters]
     14 negative:
     15  phase: parse
     16  type: SyntaxError
     17 ---*/
     18 
     19 $DONOTEVALUATE();
     20 
     21 0, class {
     22  m(x = yield) {}
     23 };