Prechádzať zdrojové kódy

fixed UInt default parameter verify error

Nicolas Cannasse 16 rokov pred
rodič
commit
61852f0e53
2 zmenil súbory, kde vykonal 9 pridanie a 4 odobranie
  1. 2 0
      doc/CHANGES.txt
  2. 7 4
      genswf9.ml

+ 2 - 0
doc/CHANGES.txt

@@ -26,6 +26,8 @@ TODO :
 	moved eof() from neko.io.FileOutput to FileInput
 	added haxe.rtti.HtmlEditor
 	added neko.db.Manager.setLockMode
+	genAS3 : fixed Error classes issues
+	flash9 : fixed UInt default parameter verify error
 
 2008-11-23: 2.02
 	Std.is(MyInterface, Class) now returns true (haXe/PHP)

+ 7 - 4
genswf9.ml

@@ -520,11 +520,14 @@ let debug_infos ?(is_min=true) ctx p =
 
 let end_fun ctx args tret =
 	let dparams = ref None in
-	let constant_value = function
+	let constant_value t = function
 		| None -> HVNone
 		| Some c ->
 			match c with
-			| TInt i -> HVInt i
+			| TInt i -> 
+				(match classify ctx t with
+				| KUInt -> HVUInt i
+				| _ -> HVInt i)
 			| TFloat s -> HVFloat (float_of_string s)
 			| TString s -> HVString s
 			| TBool b -> HVBool b
@@ -533,8 +536,8 @@ let end_fun ctx args tret =
 	in
 	List.iter (fun (_,c,t) ->
 		match !dparams with
-		| None -> if c <> None then dparams := Some [constant_value c]
-		| Some l -> dparams := Some (constant_value c :: l)
+		| None -> if c <> None then dparams := Some [constant_value t c]
+		| Some l -> dparams := Some (constant_value t c :: l)
 	) args;
 	{
 		hlmt_index = 0;