Closed Bug 507501 Opened 15 years ago Closed 15 years ago

Vector.map does not return the correct vector type

Categories

(Tamarin Graveyard :: Virtual Machine, defect, P2)

x86
All

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 513095
flash10.1

People

(Reporter: cpeyer, Assigned: tharwood)

References

Details

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>
Flags: in-testsuite?
Flags: flashplayer-qrb?
Severity: normal → major
Target Milestone: --- → flash10.1
Only happens when compiled w/o -AS3 flag
Blocks: 509502
Assignee: nobody → tharwood
Status: NEW → ASSIGNED
Flags: flashplayer-triage+
Flags: flashplayer-qrb?
Flags: flashplayer-qrb+
Priority: -- → P2
513095, 507501, and 509502 all all symptoms of an underlying SNAFU in the Vector implementation.  Fix is attached to 513095.
Depends on: TR_MAX
Fixed in by patch in 513095.
Status: ASSIGNED → RESOLVED
Closed: 15 years ago
Resolution: --- → DUPLICATE
Media added: http://hg.mozilla.org/tamarin-redux/rev/2705
Status: RESOLVED → VERIFIED
Flags: in-testsuite? → in-testsuite+
See Also: → 729053
See Also: → 742721
See Also: 729053
You need to log in before you can comment on or make changes to this bug.