tor-browser

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

target-cover-yieldexpr.js (966B)


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