Ticket #470 (closed defect: fixed)

Opened 10 months ago

Last modified 7 months ago

ECMAScript 5 introduces incompatible change to arguments object creation

Reported by: jimb Assigned to: anonymous
Type: defect Priority: major
Component: Proposals Version: 3.1
Keywords: Cc:

Description

ECMAScript 5 10.5 steps 7 and 8 suggest that a 'var arguments' declaration in a function body actually prevent the creation of a traditional arguments object altogether. That is, the spec says that this should be true:

function f() {var arguments; return arguments} f(1,2,3) === undefined

In prior versions of ECMAScript, a VariableDeclaration? for 'arguments' in the body of a function simply restated the binding for the arguments object, thus:

f(1,2,3).length === 3

My understanding is that ECMAScript 5 didn't intend to change this behavior.

Attachments

Change History

Changed 7 months ago by allen

  • status changed from new to closed
  • resolution set to fixed

This was corrected in the final version that was approved by the ECMA GA

Note: See TracTickets for help on using tickets.