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

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

Issue 2258313002: [async functions] Disallow 'await' in arrow params inside async functions (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Different approach with more tests 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 2b8e0fb3a6c8869409a51280d1395b15065ee832..224b57924a0cd7dddd69834d5581bba3e3277b53 100644
--- a/test/cctest/test-parsing.cc
+++ b/test/cctest/test-parsing.cc
@@ -7798,7 +7798,6 @@ TEST(AsyncAwait) {
"function foo(await) { return await; }",
"function* foo() { var await = 1; return await; }",
"function* foo(await) { return await; }",
- "var f = (await) => await;",
"var f = () => { var await = 1; return await; }",
"var O = { method() { var await = 1; return await; } };",
"var O = { method(await) { return await; } };",
@@ -7885,6 +7884,16 @@ TEST(AsyncAwaitErrors) {
"var O = { async method() { function await() {} } }",
"async function foo() { function await() {} }",
+ "async function foo() { var f = await => 42; }",
+ "async function foo() { var f = (await) => 42; }",
+ "async function foo() { var f = (await, a) => 42; }",
+ "async function foo() { var f = (...await) => 42; }",
+
+ "async function f() { return (await) }",
+ "async function f() { return (await, f) }",
+ "async function f() { return [await] }",
+ "async function f() { return (await = 42) }",
Dan Ehrenberg 2016/08/22 01:48:53 Consider adding tests for other kinds of async fun
adamk 2016/08/22 17:59:59 I've refactored this test to have a section for st
+
// Henrique Ferreiro's bug (tm)
"(async function foo1() { } foo2 => 1)",
"(async function foo3() { } () => 1)",
« 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