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

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

Issue 2270223002: Disallow 'yield' in async arrow parameter lists inside generators (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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/parser-base.h ('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 658e73ca84adf2869e01019c6a05bb07ff400225..c73341c77f584732ccec16ac76d65d3df8a1118c 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -7685,6 +7685,9 @@ TEST(AsyncAwait) {
"var asyncFn = async({ foo = 1 }) => foo;",
"var asyncFn = async({ foo = 1 } = {}) => foo;",
+
+ "function* g() { var f = async(yield); }",
+ "function* g() { var f = async(x = yield); }",
NULL
};
// clang-format on
@@ -7792,6 +7795,11 @@ TEST(AsyncAwaitErrors) {
"var f = async(x = await) => 1;",
+ "function* g() { var f = async yield => 1; }",
+ "function* g() { var f = async(yield) => 1; }",
+ "function* g() { var f = async(x = yield) => 1; }",
+ "function* g() { var f = async({x = yield}) => 1; }",
+
"class C { async constructor() {} }",
"class C {}; class C2 extends C { async constructor() {} }",
"class C { static async prototype() {} }",
« no previous file with comments | « src/parsing/parser-base.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698