summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/bug509982.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/bug509982.js')
-rw-r--r--js/src/jit-test/tests/basic/bug509982.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug509982.js b/js/src/jit-test/tests/basic/bug509982.js
new file mode 100644
index 0000000000..36b9364a1f
--- /dev/null
+++ b/js/src/jit-test/tests/basic/bug509982.js
@@ -0,0 +1,15 @@
+function g() {
+ const e = 0;
+ return function () {
+ switch (7) {
+ case e:
+ }
+ };
+}
+
+for (var i = 0; i < 2; i++) {
+ let f = g;
+ f();
+}
+
+// Just test that we don't crash.