Closed
Bug 1314083
Opened 8 years ago
Closed 8 years ago
CoverInitName not supported in async arrow function parameters
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla52
Tracking | Status | |
---|---|---|
firefox52 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(1 file, 1 obsolete file)
15.59 KB,
patch
|
anba
:
review+
|
Details | Diff | Splinter Review |
Test case: --- async({a = 0}) => {} --- Expected: No syntax error Actual: Throws syntax error "missing : after property id"
Assignee | ||
Updated•8 years ago
|
Assignee: nobody → andrebargull
Assignee | ||
Comment 1•8 years ago
|
||
The detection of unparenthesized "async" in Parser::memberExpr() isn't necessary to fix this bug, I've only added it to give better error messages in some cases.
Attachment #8806375 -
Flags: review?(arai.unmht)
Comment 2•8 years ago
|
||
Comment on attachment 8806375 [details] [diff] [review] Bug1314083.patch Review of attachment 8806375 [details] [diff] [review]: ----------------------------------------------------------------- Thank you :D ::: js/src/tests/ecma_2017/AsyncFunctions/cover-init-name-syntax.js @@ +44,5 @@ > + typeof async({a = 1}, {b = 2}, {c = 3} = {}); > +`), SyntaxError); > +assertThrowsInstanceOf(() => eval(` > + typeof async({a = 1}, {b = 2} = {}, {c = 3} = {}); > +`), SyntaxError); would be nice to add |a.async({a = 1});| case too.
Attachment #8806375 -
Flags: review?(arai.unmht) → review+
Assignee | ||
Comment 3•8 years ago
|
||
Updated patch to include additional test per review comment. Carrying r+ from arai.
Attachment #8806375 -
Attachment is obsolete: true
Attachment #8807090 -
Flags: review+
Assignee | ||
Updated•8 years ago
|
Keywords: checkin-needed
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/8a36d67577d8 Handle destructuring-only syntax when initially parsing async arrow parameters. r=arai
Keywords: checkin-needed
Comment 5•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/8a36d67577d8
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•