Last Comment Bug 507501 - Vector.map does not return the correct vector type
: Vector.map does not return the correct vector type
Status: VERIFIED DUPLICATE of bug 513095
:
Product: Tamarin
Classification: Components
Component: Virtual Machine (show other bugs)
: unspecified
: x86 All
: P2 major (vote)
: flash10.1
Assigned To: Tom Harwood
:
Mentors:
Depends on: TR_MAX
Blocks: 509502
  Show dependency treegraph
 
Reported: 2009-07-30 15:16 PDT by Chris Peyer
Modified: 2016-04-01 03:09 PDT (History)
2 users (show)
cpeyer: in‑testsuite+
dansmith: flashplayer‑qrb+
dansmith: flashplayer‑triage+
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Chris Peyer 2009-07-30 15:16:37 PDT
as:
function convertToUpper(item:String, index:int, v:Vector.<String>):String {
return item.toUpperCase();
}

var vec:Vector.<String> = Vector.<String>(['one','two']);


var vec2:Vector.<String> = vec.map(convertToUpper);
trace("vec2 = " + vec2);
trace(vec is Vector.<String>);

trace(vec.map(convertToUpper) is Vector.<String>);

Actual:
TypeError: Error #1034: Type Coercion failed: cannot convert []@4ec289 to __AS3__.vec.Vector.<String>.
at global$init()

Expected:
The vector returned by .map is a Vector.<String>
Comment 1 Chris Peyer 2009-08-10 12:04:01 PDT
Only happens when compiled w/o -AS3 flag
Comment 2 Tom Harwood 2009-09-21 08:25:17 PDT
513095, 507501, and 509502 all all symptoms of an underlying SNAFU in the Vector implementation.  Fix is attached to 513095.
Comment 3 Tom Harwood 2009-09-28 09:00:01 PDT
Fixed in by patch in 513095.

*** This bug has been marked as a duplicate of bug 513095 ***
Comment 4 Chris Peyer 2009-10-06 18:15:38 PDT
Media added: http://hg.mozilla.org/tamarin-redux/rev/2705

Note You need to log in before you can comment on or make changes to this bug.