Closed Bug 1345968 Opened 7 years ago Closed 7 years ago

Missing [no LineTerminator here] restriction for AsyncMethod and AsyncArrowFunction

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: anba, Unassigned)

References

Details

Attachments

(1 file)

Test case:
---
Function("({async\nm(){}})")
---

Expected: Throws SyntaxError
Actual: No SyntaxError
Also for async arrow functions:
---
Function("async\n()=>{}")
---
Summary: Missing [no LineTerminator here] restriction for AsyncMethod → Missing [no LineTerminator here] restriction for AsyncMethod and AsyncArrowFunction
arai, this doesn't have the fix for the method case. I think you should fix
that in bug 1345960.

These tests will be removed when we sync with upstream that has
https://github.com/tc39/test262/pull/895 merged.
Attachment #8845680 - Flags: review?(arai.unmht)
Comment on attachment 8845680 [details] [diff] [review]
Fix [no LineTerminator here] restriction for async arrow functions.

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

thanks!
Attachment #8845680 - Flags: review?(arai.unmht) → review+
Pushed by shu@rfrn.org:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5f2db362a1f9
Fix [no LineTerminator here] restriction for async arrow functions. (r=arai)
https://hg.mozilla.org/mozilla-central/rev/5f2db362a1f9
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: