Setter with a RestParameter should be a SyntaxError

RESOLVED FIXED in mozilla38

Status

()

defect
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: jorendorff, Assigned: arai)

Tracking

(Blocks 1 bug, {dev-doc-complete, site-compat})

unspecified
mozilla38
x86_64
Linux
Points:
---
Dependency tree / graph
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [DocArea=JS])

Attachments

(1 attachment)

Noticed by Waldo in bug 911142, comment 8.

The grammar starts out like this:

    MethodDefinition :
        set PropertyName ( PropertySetParameterList ) { FunctionBody }

    PropertySetParameterList :
        FormalParameter

and it turns out FormalParameter and FunctionRestParameter are two disjoint bits of syntax.

https://people.mozilla.org/~jorendorff/es6-draft.html#sec-method-definitions
Keywords: dev-doc-needed
Whiteboard: [DocArea=JS]
Doesn't that actually mean there has to be one single parameter and nothing else?
Comment on attachment 8548192 [details] [diff] [review]
Throw SyntaxError if RestParameter is used in setter.

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

Mm.  This at least I can polish off quickly.  Sorry I'm taking so long on some of your other patches.  :-(  Promise to get to them soon!
Attachment #8548192 - Flags: review?(jwalden+bmo) → review+
https://hg.mozilla.org/mozilla-central/rev/6a59a5ee91b4
Assignee: nobody → arai_a
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in before you can comment on or make changes to this bug.