ASI not applied for "let <linebreak> await" in async functions

RESOLVED FIXED in Firefox 55

Status

()

Core
JavaScript Engine
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: anba, Assigned: Waldo)

Tracking

Trunk
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

Attachments

(1 attachment)

(Reporter)

Description

a year ago
Test case:
---
async function f() {
    let
    await 0;
}
---

Expected: No SyntaxError
Actual: Reports a SyntaxError
(Assignee)

Comment 1

a year ago
Created attachment 8855064 [details] [diff] [review]
Patch

Saw this float by in bugmail, figured it'd be a simple patch, decided it was a good time to learn about how |await| keyword handling words.
Attachment #8855064 - Flags: review?(shu)
(Assignee)

Updated

a year ago
Assignee: nobody → jwalden+bmo
Status: NEW → ASSIGNED

Comment 2

a year ago
Comment on attachment 8855064 [details] [diff] [review]
Patch

Review of attachment 8855064 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good. Could you convert that test to a test262 test instead? What I've been doing is:

1. Add the test to test262/local
2. Open a PR upstream.
3. Remove the test262/local file when test262 is synced against a rev where the PR has been merged.
Attachment #8855064 - Flags: review?(shu) → review+

Comment 3

a year ago
Pushed by jwalden@mit.edu:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5001c15f9ec3
Properly exclude |await| from consideration as a |let| variable name in async functions, so that a newline between the two separates them into two distinct expressions.  r=shu
(Assignee)

Comment 4

a year ago
(In reply to Shu-yu Guo [:shu] from comment #2)
> 2. Open a PR upstream.

https://github.com/tc39/test262/pull/956
https://hg.mozilla.org/mozilla-central/rev/5001c15f9ec3
Status: ASSIGNED → RESOLVED
Last Resolved: a year ago
status-firefox55: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.