summaryrefslogtreecommitdiffstats
path: root/js/src/tests/test262/language/statements/for-of/head-let-bound-names-fordecl-tdz.js
blob: f10b0aee993f2d2e5468720648ee31e7e2a411ba (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 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.12_S2
description: >
    ForIn/Of: Bound names of ForDeclaration are in TDZ (for-of)
---*/

assert.throws(ReferenceError, function() {
  let x = 1;
  for (let x of [x]) {}
});

reportCompare(0, 0);