summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/for-of/head-const-init.js
blob: add93cf2df06ba1edf4062590cc83d4813dda69a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// |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 (ForDeclaration of AssignmentExpression) Statement
negative:
  phase: parse
  type: SyntaxError
---*/

$DONOTEVALUATE();

for (const x = 1 of []) {}