Issue 117: inline array/object reference is wrong
Status:  Fixed
Owner: ----
Closed:  Aug 2011
Reported by Andy.onthewings, May 10, 2011
Tested with haxe r3801, hxcpp r319, on Mac 10.6.7.
The last trace of the below program is wrong.
The bug disappear if removeItems is not inline.

	using Lambda;

	class Test {
		inline public static function removeItems<T>(tarArray:Array<T>, items:Array<T>):Bool {
			var removed:Bool = false;
			var l:Int = tarArray.length;
		
			while (l-- > 0) {
				if (items.indexOf(tarArray[l]) > -1) {
					tarArray.splice(l, 1);
					removed = true;
				}
			}
		
			return true;
		}
	
		static function main():Void {
			var array = [1,2,3,4,5,5,7,5,9,0,11,12,13];
			removeItems(array, [1,11]);
			trace(array.length); //11 is correct
		
			var ta = [{name: "Aaron", sex: "Male", hair: "Brown"}, {name: "Linda", sex: "Female", hair: "Blonde"}, {name: "Katie", sex: "Female", hair: "Brown"}, {name: "Nikki", sex: "Female", hair: "Blonde"}];

			trace({sex: "Female"}); //wrong: { hair => Blonde, name => Nikki, sex => Female }
		}
	}
May 12, 2011
#1 Andy.onthewings
btw the release version of hxcpp (2.07.0) does not have this bug.
Aug 10, 2011
Project Member #2 gameh...@gmail.com
This may be fixed by another change I've made - please check.
Status: Fixed
Aug 10, 2011
#3 andy@onthewings.net
Yes, it is fixed now. Thanks!