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

Unified Diff: test/mjsunit/for-in.js

Issue 1602823003: [parser] Disallow Expression in for..of statements (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 11 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
Index: test/mjsunit/for-in.js
diff --git a/test/mjsunit/for-in.js b/test/mjsunit/for-in.js
index 644c27a63277b25729734afb061a286f38e1e801..9ee6461c128792b8920cce0e5626286012f7198e 100644
--- a/test/mjsunit/for-in.js
+++ b/test/mjsunit/for-in.js
@@ -131,3 +131,15 @@ for (i=0 ; i < 3; ++i) {
}
assertEquals(["2147483650"], keys);
})();
+
+(function() {
+ var iterCount = 0;
+ var key;
+
+ for (key in { badKey: 0 }, { goodKey: 0 }) {
+ assertEquals('goodKey', key);
+ iterCount += 1;
+ }
+
+ assertEquals(1, iterCount);
+})();
« test/mjsunit/es6/iteration-syntax.js ('K') | « test/mjsunit/es6/iteration-syntax.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698