summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/testForInLoopChangeIteratorType.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/testForInLoopChangeIteratorType.js')
-rw-r--r--js/src/jit-test/tests/basic/testForInLoopChangeIteratorType.js11
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/testForInLoopChangeIteratorType.js b/js/src/jit-test/tests/basic/testForInLoopChangeIteratorType.js
new file mode 100644
index 0000000000..0efce83648
--- /dev/null
+++ b/js/src/jit-test/tests/basic/testForInLoopChangeIteratorType.js
@@ -0,0 +1,11 @@
+function testForInLoopChangeIteratorType() {
+ for(y in [0,1,2]) y = NaN;
+ (function(){
+ [].__proto__.u = void 0;
+ for (let y in [5,6,7,8])
+ y = NaN;
+ delete [].__proto__.u;
+ })()
+ return "ok";
+}
+assertEq(testForInLoopChangeIteratorType(), "ok");