summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/const/syntax/const-invalid-assignment-statement-body-for-of.js
blob: a0c6ae502cce2571c00da98a7923c0cce1f7b657 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright (C) 2011 the V8 project authors. All rights reserved.
// This code is governed by the BSD license found in the LICENSE file.
/*---
es6id: 13.6.4.10_S1.a.i
description: >
    const: invalid assignment in Statement body
---*/

assert.throws(TypeError, function() {
  for (const x of [1, 2, 3]) { x++ }
});

reportCompare(0, 0);