Browse Source

Vector.length is now Int (fixed issue #1302)

Nicolas Cannasse 12 years ago
parent
commit
a4a5a2e220
3 changed files with 4 additions and 2 deletions
  1. 1 0
      doc/CHANGES.txt
  2. 2 1
      genswf9.ml
  3. 1 1
      std/flash/Vector.hx

+ 1 - 0
doc/CHANGES.txt

@@ -44,6 +44,7 @@
 	macro : added haxe.macro.ExprTools/ComplexTypeTools/TypeTools
 	macro : changed reification syntax
 	all : added array comprehension
+	flash : Vector.length is now Int instead of UInt
 
 2012-07-16: 2.10
 	java/cs : added two new targets (beta)

+ 2 - 1
genswf9.ml

@@ -312,7 +312,8 @@ let property ctx p t =
 		| _ -> as3 p, None, false);
 	| TInst ({ cl_path = ["flash"],"Vector" },_) ->
 		(match p with
-		| "length" | "fixed" | "toString" -> ident p, None, false
+		| "length" -> ident p, Some KInt, false (* UInt in the spec *)
+		| "fixed" | "toString" -> ident p, None, false
 		| "iterator" -> ident p, None, true
 		| _ -> as3 p, None, false);
 	| TInst ({ cl_path = [],"String" },_) ->

+ 1 - 1
std/flash/Vector.hx

@@ -26,7 +26,7 @@ package flash;
 **/
 @:require(flash10) extern class Vector<T> implements ArrayAccess<T> {
 
-	var length : UInt;
+	var length : Int;
 	var fixed : Bool;
 
 	function new( ?length : UInt, ?fixed : Bool ) : Void;