[async functions] Disallow 'await' in arrow params inside async functions
The following code was previously accepted: async function f() { let g = (await) => {}; } But per the spec, using 'await' is disallowed in arrow parameters by an early error rule (just as 'yield' is disallowed in arrow params inside generators). There was special logic in ParseUnaryExpression which seems to have been there only to allow that case. Having removed it, we get a SyntaxError in the right cases anyway when ParseUnaryExpression chokes on whatever illegal token follows 'await' in the cases this code previously handled. Also removes the unnecessary AsyncBindingPatternProduction enum value. R=caitp@igalia.com, littledan@chromium.org BUG=v8:4483 Review-Url: https://codereview.chromium.org/2258313002 Cr-Commit-Position: refs/heads/master@{#38802}
Showing
Please
register
or
sign in
to comment