tenfourfox/js/src/tests/ecma_6/LexicalEnvironment/unscopables-tdz.js

10 lines
219 B
JavaScript

// Accessing an uninitialized variable due to @@unscopables is still a ReferenceError.
with ({x: 1, [Symbol.unscopables]: {x: true}})
assertThrowsInstanceOf(() => x, ReferenceError);
let x;
reportCompare(0, 0);