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

Unified Diff: test/mjsunit/es6/iteration-syntax.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/es6/iteration-syntax.js
diff --git a/test/mjsunit/es6/iteration-syntax.js b/test/mjsunit/es6/iteration-syntax.js
index c6a7d477bc747e3a2061f19179963e1ade60d200..64bcc2f8470750037c7ee7ccde579a1bbe2a5176 100644
--- a/test/mjsunit/es6/iteration-syntax.js
+++ b/test/mjsunit/es6/iteration-syntax.js
@@ -66,6 +66,9 @@ StrictSyntaxError("function f() { for (x = 3 of y) { } }");
StrictSyntaxError("function f() { for (var x = 3 of y) { } }");
StrictSyntaxError("function f() { for (let x = 3 of y) { } }");
+StrictSyntaxError("function f() { for (x of y, z) { } }");
adamk 2016/01/19 22:21:47 Rather than adding tests here (which limits you no
+StrictSyntaxError("function f() { for (var x of y, z) { } }");
+StrictSyntaxError("function f() { for (let x of y, z) { } }");
// Alack, this appears to be valid.
function f() { for (of of y) { } }
« src/parsing/parser.cc ('K') | « src/parsing/preparser.cc ('k') | test/mjsunit/for-in.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698