Closed
Bug 1169853
Opened 9 years ago
Closed 9 years ago
export default AssignmentExpression without trailing semicolon wrongly passes parser.
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla41
Tracking | Status | |
---|---|---|
firefox41 | --- | fixed |
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
(deleted),
patch
|
shu
:
review+
|
Details | Diff | Splinter Review |
Reflect.parse("export default a 1") Returns valid Program, since semicolon after AssignmentExpression is not checked. http://people.mozilla.org/~jorendorff/es6-draft.html#sec-exports > ExportDeclaration : > ... > export default [lookahead ∉ {function, class}] AssignmentExpression[In] ; https://dxr.mozilla.org/mozilla-central/source/js/src/frontend/Parser.cpp#4520 > default: > tokenStream.ungetToken(); > kid = assignExpr(InAllowed, YieldIsKeyword); > break; MatchOrInsertSemicolon should be there.
Assignee | ||
Comment 1•9 years ago
|
||
Try is running: https://treeherder.mozilla.org/#/jobs?repo=try&revision=d8475878269b
Assignee: nobody → arai.unmht
Assignee | ||
Comment 2•9 years ago
|
||
Added MatchOrInsertSemicolon after assingExpr for `export default`.
Attachment #8613184 -
Flags: review?(shu)
Comment 3•9 years ago
|
||
Thanks for fixing this arai.
Updated•9 years ago
|
Attachment #8613184 -
Flags: review?(shu) → review+
Comment 5•9 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/ae084da24b51
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla41
You need to log in
before you can comment on or make changes to this bug.
Description
•