diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/cacheir/bug1772824.js | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/cacheir/bug1772824.js b/js/src/jit-test/tests/cacheir/bug1772824.js new file mode 100644 index 0000000000..f399a77cea --- /dev/null +++ b/js/src/jit-test/tests/cacheir/bug1772824.js @@ -0,0 +1,15 @@ +function foo() { eval(); boundName += 1; } + +boundName = 0; +for (var i = 0; i < 10; i++) { + eval("var x" + i + " = 0;"); + foo(); +} + +// Redefine variable as const +evaluate(` + const boundName = 0; + for (var i = 0; i < 2; i++) { + try { foo(); } catch {} + } +`); |