tor-browser

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

target-cover-yieldexpr.js (884B)


      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-update-expressions-static-semantics-early-errors
      6 description: Applied to a "covered" YieldExpression
      7 info: |
      8  UpdateExpression :
      9    LeftHandSideExpression ++
     10    LeftHandSideExpression --
     11 
     12  - It is an early Syntax Error if AssignmentTargetType of
     13    LeftHandSideExpression is invalid or strict.
     14 
     15  12.15.3 Static Semantics: AssignmentTargetType
     16 
     17  AssignmentExpression:
     18    YieldExpression
     19    ArrowFunction
     20    AsyncArrowFunction
     21    LeftHandSideExpression = AssignmentExpression
     22    LeftHandSideExpression AssignmentOperator AssignmentExpression
     23 
     24  1. Return invalid.
     25 features: [generators]
     26 negative:
     27  phase: parse
     28  type: SyntaxError
     29 ---*/
     30 
     31 $DONOTEVALUATE();
     32 
     33 function* g() {
     34  (yield)++;
     35 }