summaryrefslogtreecommitdiffstats
path: root/js/src/tests/non262/lexical-environment/var-in-catch-body-annex-b-eval-for-of.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/tests/non262/lexical-environment/var-in-catch-body-annex-b-eval-for-of.js')
-rw-r--r--js/src/tests/non262/lexical-environment/var-in-catch-body-annex-b-eval-for-of.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/src/tests/non262/lexical-environment/var-in-catch-body-annex-b-eval-for-of.js b/js/src/tests/non262/lexical-environment/var-in-catch-body-annex-b-eval-for-of.js
new file mode 100644
index 0000000000..b433b68b6e
--- /dev/null
+++ b/js/src/tests/non262/lexical-environment/var-in-catch-body-annex-b-eval-for-of.js
@@ -0,0 +1,12 @@
+// |reftest| skip-if(!xulRuntime.shell)
+
+evaluate(`
+ try { throw null; } catch (e) { eval("for (var e of []) {}") }
+`);
+
+new Function(`
+ try { throw null; } catch (e) { eval("for (var e of []) {}") }
+`)();
+
+if (typeof reportCompare === "function")
+ reportCompare(true, true);