head-const-bound-names-fordecl-tdz.js (358B)
1 // Copyright (C) 2011 the V8 project authors. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 /*--- 4 es6id: 13.6.4.12_S2 5 description: > 6 ForIn/Of: Bound names of ForDeclaration are in TDZ (for-of) 7 ---*/ 8 9 assert.throws(ReferenceError, function() { 10 let x = 1; 11 for (const x of [x]) {} 12 }); 13 14 reportCompare(0, 0);