summaryrefslogtreecommitdiff
path: root/test/language/statements/for-of/head-var-no-expr.js
blob: 412b0e3ce1a87797e4c8ab5964f4dce70900502d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
// Copyright (C) 2016 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.

/*---
description: Expression not allowed in head's AssignmentExpression position
info: |
    IterationStatement :
        for ( var ForBinding of AssignmentExpression ) Statement
es6id: 13.7
negative:
  phase: early
  type: SyntaxError
---*/

throw "Test262: This statement should not be evaluated.";

for (var x of [], []) {}