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