Vector.splice bug

Usually people complain about opensource projects because they lack of documentation ( that’s true most of the times.. ), but this doens’t happen only there…

go site
Today I’ve spent a lot of time trying to understand why I was so stupid because I wasn’t able to concatenate 2 vectors of int using splice.
But for what you can read from the *official* Adobe documentation, which says (about the third parameter for the splice method):

… items — An optional list of one or more comma-separated values, **or a Vector**, to insert into the Vector at the position specified in the¬†startIndex parameter.

follow link
Ok, that’s why I didn’t know why I couldn’t manage to make it work! This simple code gives wrong results:

1
2
3
4
5
6
7
8
9
10
11
12
13
var v1: Vector.<int> = new Vector.</int><int>();
v1.push(1);
v1.push(2);
v1.push(3);
v1.push(4);

var v2: Vector.</int><int> = new Vector.</int><int>();
v2.push(100);
v2.push(200);  
v1.splice( 1, 1, v2 );  

// Expected result: [1,100,200,3,4]
// Actual result: [1,0,3,4] </int>

It seems that the third parameter is being casted into int and so only ‘0’ has been inserted into the first Vector!

domyhomework I tried to look into Adobe jira bugbase and what I’ve found there is that it was a known bug since long time and it has been also moved to the tamarin bugbase.

http://rubygosoftware.com/nursing-school-essay-help/ The problem is that at the end they simply closed the bug as invalid bug because the documentation was wrong!

Funny