Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Unified Diff: test/mjsunit/es6/regress/regress-2506.js

Issue 1218543003: [es6] Ensure that for-in/of loops have a proper TDZ for their boundnames (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/mjsunit/es6/debug-stepnext-for.js ('k') | test/mjsunit/harmony/destructuring.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/es6/regress/regress-2506.js
diff --git a/test/mjsunit/es6/regress/regress-2506.js b/test/mjsunit/es6/regress/regress-2506.js
index b5cc91dbd78881cb6697f887252fa85f7c5f4272..5f88fcd1d48966a64e5686bebb9c04719f7082d3 100644
--- a/test/mjsunit/es6/regress/regress-2506.js
+++ b/test/mjsunit/es6/regress/regress-2506.js
@@ -18,15 +18,15 @@ assertEquals(3, f[2]());
let x = 1;
s = 0;
-for (const x of [x, x+1, x+2]) {
- s += x;
+for (const z of [x, x+1, x+2]) {
+ s += z;
}
assertEquals(6, s);
s = 0;
var q = 1;
-for (const q of [q, q+1, q+2]) {
- s += q;
+for (const x of [q, q+1, q+2]) {
+ s += x;
}
assertEquals(6, s);
@@ -56,15 +56,15 @@ assertThrows("'use strict'; for (const x in [1,2,3]) { x++ }", TypeError);
let x = 1;
s = 0;
- for (const x of [x, x+1, x+2]) {
- s += x;
+ for (const q of [x, x+1, x+2]) {
+ s += q;
}
assertEquals(6, s);
s = 0;
var q = 1;
- for (const q of [q, q+1, q+2]) {
- s += q;
+ for (const x of [q, q+1, q+2]) {
+ s += x;
}
assertEquals(6, s);
« no previous file with comments | « test/mjsunit/es6/debug-stepnext-for.js ('k') | test/mjsunit/harmony/destructuring.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698