Przeglądaj źródła

the underlying type of Int is evidently NOT String

Simon Krajewski 12 lat temu
rodzic
commit
c664fa8964
2 zmienionych plików z 4 dodań i 1 usunięć
  1. 1 0
      genphp.ml
  2. 3 1
      typeload.ml

+ 1 - 0
genphp.ml

@@ -208,6 +208,7 @@ let rec is_string_type t =
 	   (match !(a.a_status) with
 	   | Statics ({cl_path = ([], "String")}) -> true
 	   | _ -> false)
+	| TAbstract (a,pl) -> is_string_type (Codegen.Abstract.get_underlying_type a pl)
 	| _ -> false
 
 let is_string_expr e = is_string_type e.etype

+ 3 - 1
typeload.ml

@@ -116,7 +116,9 @@ let make_module ctx mpath file tdecls loadp =
 			} in
 			decls := (TAbstractDecl a, decl) :: !decls;
 			match d.d_data with
-			| [] when Meta.has Meta.CoreType a.a_meta -> acc
+			| [] when Meta.has Meta.CoreType a.a_meta ->
+				a.a_this <- t_dynamic;
+				acc
 			| fields ->
 				let rec loop = function
 					| [] ->