Vector.map does not return the correct vector type

VERIFIED DUPLICATE of bug 513095

Status

Tamarin
Virtual Machine
P2
major
VERIFIED DUPLICATE of bug 513095
8 years ago
a year ago

People

(Reporter: Chris Peyer, Assigned: Tom Harwood)

Tracking

unspecified
flash10.1
x86
All
Dependency tree / graph
Bug Flags:
in-testsuite +
flashplayer-qrb +
flashplayer-triage +

Details

(Reporter)

Description

8 years ago
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?

Updated

8 years ago
Severity: normal → major
Target Milestone: --- → flash10.1
(Reporter)

Comment 1

8 years ago
Only happens when compiled w/o -AS3 flag
(Reporter)

Updated

8 years ago
Blocks: 509502

Updated

8 years ago
Assignee: nobody → tharwood
Status: NEW → ASSIGNED
Flags: flashplayer-triage+
Flags: flashplayer-qrb?
Flags: flashplayer-qrb+
Priority: -- → P2
(Assignee)

Comment 2

8 years ago
513095, 507501, and 509502 all all symptoms of an underlying SNAFU in the Vector implementation.  Fix is attached to 513095.
Depends on: 513095
(Assignee)

Comment 3

8 years ago
Fixed in by patch in 513095.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 513095
(Reporter)

Comment 4

8 years ago
Media added: http://hg.mozilla.org/tamarin-redux/rev/2705
Status: RESOLVED → VERIFIED
Flags: in-testsuite? → in-testsuite+
See Also: → bug 729053
See Also: → bug 742721
See Also: bug 729053
You need to log in before you can comment on or make changes to this bug.