[webkit-reviews] review denied: [Bug 201615] Arrow function parameter default expressions should not permit await keyword : [Attachment 378411] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Sep 10 16:48:06 PDT 2019
Ross Kirsling <ross.kirsling at sony.com> has denied Ross Kirsling
<ross.kirsling at sony.com>'s request for review:
Bug 201615: Arrow function parameter default expressions should not permit
await keyword
https://bugs.webkit.org/show_bug.cgi?id=201615
Attachment 378411: Patch
https://bugs.webkit.org/attachment.cgi?id=378411&action=review
--- Comment #2 from Ross Kirsling <ross.kirsling at sony.com> ---
Comment on attachment 378411
--> https://bugs.webkit.org/attachment.cgi?id=378411
Patch
Ugh, guess this solution is too naive since it breaks, e.g., `await => {}` at
the top level (which evidently neither we nor test262 have tests for...).
Also the problem description is a bit off.
We need to prohibit await in default expressions of:
- async arrow and non-arrow functions
- non-async arrow functions in an async context
So these need to become errors:
async function f(x = await => {}) {}
async (x = await => {}) => {};
async function f() { (x = await => {}) => {}; }
async () => { (x = await => {}) => {}; };
And these must not become errors:
async function f() { function g(x = await => {}) {} }
(x = await => {}) => {};
More information about the webkit-reviews
mailing list