block-local-use-before-initialization-in-prior-statement.js (374B)
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.1 5 description: > 6 const: block local use before initialization in prior statement. 7 (TDZ, Temporal Dead Zone) 8 ---*/ 9 10 assert.throws(ReferenceError, function() { 11 { 12 x; const x = 1; 13 } 14 }); 15 16 reportCompare(0, 0);