Browse Source

flash 6-8 bugfix

Nicolas Cannasse 17 years ago
parent
commit
3bff77bcdd
2 changed files with 4 additions and 1 deletions
  1. 2 1
      doc/CHANGES.txt
  2. 2 0
      std/Type.hx

+ 2 - 1
doc/CHANGES.txt

@@ -18,7 +18,7 @@
 	use "Dynamic" instead of Dynamic->Void for flash9 IEventDispatcher
 	always use full classes paths for genAS3
 	prevent different get/set property accesses when implementing an interface
-	fixed assign of dynamicfunction references in PHP 
+	fixed assign of dynamicfunction references in PHP
 	haXe/PHP now generates code for extern classes __init__
 	added strings literal support in haxe.Template
 	fixed Process arguments and exitCode() in haXe/PHP
@@ -40,6 +40,7 @@
 	moved StringTools.baseEncode/Decode to haxe.BaseCode
 	fixed binary resources for Flash, JS and PHP outputs
 	fixed compiler bug with inline + optional arguments
+	fixed Type.createInstance and createEmptyInstance with Array for flash6-8
 
 2008-07-28: 2.0
 	fixed current package bug in inherited constructor type

+ 2 - 0
std/Type.hx

@@ -286,6 +286,7 @@ class Type {
 			default: throw "Too many arguments";
 			}
 		#elseif flash
+			if( cl == Array ) return new Array();
 			var o = { __constructor__ : cl, __proto__ : cl.prototype };
 			cl["apply"](o,args);
 			return o;
@@ -325,6 +326,7 @@ class Type {
 			}
 			return null;
 		#elseif flash
+			if( cl == Array ) return new Array();
 			var o : Dynamic = __new__(_global["Object"]);
 			o.__proto__ = cl.prototype;
 			return o;