summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/for-await-of/async-gen-dstr-let-ary-ptrn-init-err.js
blob: 6289bd9ae2db8f2d5b04cfbe841a07a9184a29b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// |reftest| error:SyntaxError
// Copyright (C) 2019 Aleksey Shvayka. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
esid: sec-iteration-statements
description: >
  Initializer is not allowed in head's ForDeclaration position.
info: |
  IterationStatement:
    for await (ForDeclaration of AssignmentExpression) Statement
negative:
  phase: parse
  type: SyntaxError
features: [async-iteration]
---*/

$DONOTEVALUATE();

async function fn() {
  for await (let [x] = 1 of []) {}
}