summaryrefslogtreecommitdiffstats
path: root/js/src/tests/ecma_6/LexicalEnvironment/unscopables-tdz.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/ecma_6/LexicalEnvironment/unscopables-tdz.js')
-rw-r--r--js/src/tests/ecma_6/LexicalEnvironment/unscopables-tdz.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/js/src/tests/ecma_6/LexicalEnvironment/unscopables-tdz.js b/js/src/tests/ecma_6/LexicalEnvironment/unscopables-tdz.js
new file mode 100644
index 000000000..ce6b1df92
--- /dev/null
+++ b/js/src/tests/ecma_6/LexicalEnvironment/unscopables-tdz.js
@@ -0,0 +1,9 @@
+// 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);
+