[Bug 23056] Function's length property is inconsistent with EcmaScript

https://www.w3.org/Bugs/Public/show_bug.cgi?id=23056

--- Comment #3 from Boris Zbarsky <bzbarsky@mit.edu> ---
The ES6 spec is a bit unclear here.

In particular, see section 8.3.16.6 in the draft you link to, which explicitly
sets the length to the ExpectedArgumentCount of the ParameterList.  And the
definition of that is on page 201 (section 13.1) and returns:

  the number of FormalParameters to the left of either the rest parameter or
the
  first FormalParameter with an Initialiser.  A FormalParameter without an
  initialiser is allowed after the first parameter with an initialiser but such
  parameters are considered to be optional with undefined as their default
value.

So it sort of depends on what one means by "optional argument", I guess....  We
should take this to public-script-coord.

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Sunday, 25 August 2013 16:08:22 UTC