tor-browser

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

async-gen-dstr-var-ary-ptrn-init-err.js (527B)


      1 // |reftest| error:SyntaxError
      2 // Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
      3 // This code is governed by the BSD license found in the LICENSE file.
      4 /*---
      5 esid: sec-iteration-statements
      6 description: >
      7  Initializer is not allowed in head's ForBinding position.
      8 info: |
      9  IterationStatement:
     10    for await (var ForBinding of AssignmentExpression) Statement
     11 negative:
     12  phase: parse
     13  type: SyntaxError
     14 features: [async-iteration]
     15 ---*/
     16 
     17 $DONOTEVALUATE();
     18 
     19 async function fn() {
     20  for await (var [x] = 1 of []) {}
     21 }