when a local identifier named arguments is defined type error 1034 is thrown

NEW
Unassigned

Status

Tamarin
Virtual Machine
9 years ago
7 years ago

People

(Reporter: Jeff Dyer, Unassigned)

Tracking

(Blocks: 1 bug)

unspecified
Future
Bug Flags:
flashplayer-qrb +

Details

(Reporter)

Description

9 years ago
Test Case: Reference "http://bugzilla.mozilla.org/show_bug.cgi?id=94506" -- When we invoke a function, the arguments object should take  a back seat to any local identifier named "arguments".

function F2()
{
  var arguments = 55;
  return arguments;
}
print(F2());
Actual Results:TypeError: Error #1034: Type Coercion failed: cannot convert 55 to Array.
        at ()
        at global$init()

Expected Results:55

Workaround:
        
        
Transferred Comments:

BugDB Migration - Mon Jun 04 12:32:43 CDT 2007
[ssubrama 11/29/06] Entered Bug.
[ssubrama 11/29/06] Sending to QRB.
[ssubrama 11/30/06] This test  case is actually in the compiler errors test suite.  After this bug is fixed it has to be moved to asrt/test/ecma3/tests/function folder  and to mozilla 

JIRA Migration Admin - Mon Jun 04 12:32:43 CDT 2007
Milestone ID = 1378
Milestone = FP 10 - Code Complete
Build ID = 23495
Build = AVMPLUS_1_0_0_d693
Fix Build ID = null
Fix Build = null


JIRA Migration Admin - Mon Jun 04 12:32:43 CDT 2007
Move from BugDB issue number 192358

Lars Hansen - Mon Dec 17 09:16:26 CST 2007
The problem here is that verifier.cpp (around line 185, search for NEED_ARGUMENTS and then ARRAY_TYPE) forces the type of the slot to "array".  This is wrong; the type needs to be "*".  But it's not clear that there are not dependencies elsewhere on the type of this slot being "array".  It could look like DebugStackFrame::locals "knows" that the slot is an array if NEED_ARGUMENTS or NEED_REST is set.  That's bogus, of course.  DebugStackFrame::setLocal knows something too but does not use that knowledge.

Trevor Baker - Tue Jan 27 15:56:18 CST 2009
back to internal review for reprioritization


This bug transferred from: http://bugs.adobe.com/jira/browse/ASC-2251

Comment 1

8 years ago
Actually a semi-important language usability bug.
Blocks: 472863
Hardware: x86 → All
Target Milestone: --- → Future

Updated

7 years ago
Assignee: nobody → lhansen
Flags: flashplayer-qrb+

Comment 2

7 years ago
Not working on this until 2011 at the earliest.
Assignee: lhansen → nobody
You need to log in before you can comment on or make changes to this bug.