tor-browser

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

invalid-assignment-target-for-await-of-loop.js (833B)


      1 // |reftest| error:SyntaxError module
      2 // Copyright (C) 2018 André Bargull. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 
      5 /*---
      6 esid: sec-static-semantics-static-semantics-assignmenttargettype
      7 description: >
      8  import.meta is not a valid assignment target.
      9 info: |
     10  Static Semantics: AssignmentTargetType
     11 
     12    ImportMeta:
     13      import.meta
     14 
     15    Return invalid.
     16 
     17  13.7.5.1 Static Semantics: Early Errors
     18    IterationStatement:
     19      for await ( LeftHandSideExpression of AssignmentExpression ) Statement
     20 
     21    It is a Syntax Error if AssignmentTargetType of LeftHandSideExpression is not simple.
     22 flags: [module]
     23 negative:
     24  phase: parse
     25  type: SyntaxError
     26 features: [import.meta, async-iteration]
     27 ---*/
     28 
     29 $DONOTEVALUATE();
     30 
     31 async function* f() {
     32    for await (import.meta of null) ;
     33 }