summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/const/syntax/const-invalid-assignment-statement-body-for-in.js
blob: 3c2c66c4c7981de0ba9c74e31f7e98d67405514c (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 in [1, 2, 3]) { x++ }
});

reportCompare(0, 0);