Sfoglia il codice sorgente

fixed "new Vector"

Nicolas Cannasse 15 anni fa
parent
commit
d61cdd11f9
1 ha cambiato i file con 4 aggiunte e 2 eliminazioni
  1. 4 2
      genas3.ml

+ 4 - 2
genas3.ml

@@ -549,8 +549,10 @@ and gen_expr ctx e =
 				spr ctx " = ";
 				gen_value ctx e
 		) vl;
-	| TNew (c,_,el) ->
-		print ctx "new %s(" (s_path ctx true c.cl_path e.epos);
+	| TNew (c,params,el) ->
+		(match c.cl_path, params with
+		| (["flash"],"Vector"), [pt] -> print ctx "new Vector.<%s>(" (type_str ctx pt e.epos)
+		| _ -> print ctx "new %s(" (s_path ctx true c.cl_path e.epos));
 		concat ctx "," (gen_value ctx) el;
 		spr ctx ")"
 	| TIf (cond,e,eelse) ->