Closed Bug 884372 Opened 11 years ago Closed 8 years ago

Update default parameter implementation to match spec

Categories

(Core :: JavaScript Engine, defect)

x86
macOS
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1283482

People

(Reporter: bzbarsky, Unassigned)

Details

It looks like bug 757676 implemented based on a document that was at that point 3 years out of date... See http://lists.w3.org/Archives/Public/public-script-coord/2013AprJun/0732.html for more details. Not sure whether we have an ES6 tracker that should track this.
Blocks: es6
(In reply to Boris Zbarsky (:bz) from comment #0) > It looks like bug 757676 implemented based on a document that was at that > point 3 years out of date... SpiderMonkey doesn't support non-trailing default parameters not because the wiki said it was banned but because at the time we thought the semantics might change or they might even end up being banned. (I asked dherman one or two pointed questions about them and got a definite "don't implement that".) We haven't looked at it since, but should.
Keywords: dev-doc-needed
Pretty sure this is a dupe of bug 777060.
If that's the only difference we have, then yes.
Good point; I think it's not. The following should be valid but isn't accepted by SpiderMonkey: > function x({ a } = { a: 10 }){} >> SyntaxError: missing ) after formal parameters
Depends on: 777060
Depends on: 1022962
Depends on: 1022967
Depends on: 1018628
Assignee: general → nobody
Depends on: 1187502
The remaining stuff falls under bug 1283482, so I'm duping this forward.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
No longer blocks: es6
No longer depends on: 1022967, 1187502, 777060, 1018628, 1022962
You need to log in before you can comment on or make changes to this bug.