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

Unified Diff: test/cctest/test-parsing.cc

Issue 1900033003: Disallow generator declarations in certain locations (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase Created 4 years, 8 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 | « src/parsing/preparser.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cctest/test-parsing.cc
diff --git a/test/cctest/test-parsing.cc b/test/cctest/test-parsing.cc
index c36a9645db9fc57299490cee8b2273a1434770dd..fbd9915ed19932219e81677eaf68c3844ea3c052 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -7142,6 +7142,13 @@ TEST(FunctionDeclarationError) {
"with ({}) label: function f() { };",
"if (true) label: function f() {}",
"if (true) {} else label: function f() {}",
+ "if (true) function* f() { }",
+ "label: function* f() { }",
+ // TODO(littledan, v8:4806): Ban duplicate generator declarations in
+ // a block, maybe by tracking whether a Variable is a generator declaration
+ // "{ function* f() {} function* f() {} }",
+ // "{ function f() {} function* f() {} }",
+ // "{ function* f() {} function f() {} }",
NULL
};
// Valid only in sloppy mode, with or without
« no previous file with comments | « src/parsing/preparser.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698