Closed Bug 299645 Opened 19 years ago Closed 19 years ago

arguments entries are always aliased with parameters (corresponding properties of activation object)

Categories

(Core :: JavaScript Engine, defect)

1.7 Branch
x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 292215

People

(Reporter: mozilla, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (compatible; Konqueror/3.4; Linux) KHTML/3.4.0 (like Gecko)
Build Identifier: 

arguments[n] should alias to local parameter n *only* if the function has 
been called with k > n variables. 
Or in other words (from section 10.1.8 of ECMAscript spec): 
'In the case when arg is less than the number of formal parameters for the 
Function object, this property shares its value with the corresponding property 
of the activation object.' 

Reproducible: Always
Assignee: nobody → general
Component: General → JavaScript Engine
Product: Firefox → Core
QA Contact: general → general
Version: unspecified → 1.7 Branch
Attached file test-case.
As f is called with k=1 parameters, arguments[1] should not alias with y.
Instead printing "3" (as it does in my version), "undefined" should be printed.
Thanks, this is already covered by bug 292215 -- nice simple testcase here, I
will make sure it works when fixing 292215.

/be

*** This bug has been marked as a duplicate of 292215 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: