Closed Bug 1141392 Opened 9 years ago Closed 9 years ago

Line terminator incorrectly allowed after arrow function arguments

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: shu, Assigned: 446240525)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, Whiteboard: [DocArea=JS])

Attachments

(1 file, 1 obsolete file)

The production for ArrowFunction specifies no line terminator after the args [1].

We currently parse

  var fn = (a)
  => 1

[1] https://people.mozilla.org/~jorendorff/es6-draft.html#sec-arrow-function-definitions

Thanks for caitp from #jslang for pointing this out!
Blocks: es6
Attached patch bug-1141392-v1.patch (obsolete) — Splinter Review
Attachment #8576717 - Flags: review?(jorendorff)
Comment on attachment 8576717 [details] [diff] [review]
bug-1141392-v1.patch

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

Thank you for the patch!
Attachment #8576717 - Flags: review?(jorendorff) → review+
Fixed one devtools test failure.
Attachment #8576717 - Attachment is obsolete: true
Attachment #8577721 - Flags: review+
 https://treeherder.mozilla.org/#/jobs?repo=try&revision=0a482f4be30f
Assignee: nobody → 446240525
Whiteboard: [DocArea=JS]
https://hg.mozilla.org/mozilla-central/rev/66c780b6b377
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: