瀏覽代碼

minor fixes

Nicolas Cannasse 14 年之前
父節點
當前提交
8c0355264f
共有 2 個文件被更改,包括 6 次插入1 次删除
  1. 1 0
      genxml.ml
  2. 5 1
      typeload.ml

+ 1 - 0
genxml.ml

@@ -363,6 +363,7 @@ let generate_type com t =
 			| Some t ->
 				(match c.cl_path with
 				| ["flash";"errors"], _ -> ext
+				| _ when t == t_dynamic -> " implements Dynamic" :: ext
 				| _ -> (" implements Dynamic<" ^ stype t ^ ">") :: ext)
 		) in
 		let ext = (match c.cl_path with

+ 5 - 1
typeload.ml

@@ -620,7 +620,11 @@ let patch_class ctx c fields =
 				(match f.cff_kind with
 				| FFun (pl,ff) ->
 					let param ((n,opt,t,e) as p) =
-						try n, opt, (Hashtbl.find h (("$" ^ n),false)).tp_type, e with Not_found -> p
+						try
+							let t2 = (try Hashtbl.find h (("$" ^ f.cff_name ^ "__" ^ n),false) with Not_found -> Hashtbl.find h (("$" ^ n),false)) in
+							n, opt, t2.tp_type, e
+						with Not_found ->
+							p
 					in
 					f.cff_kind <- FFun (pl,{ ff with f_args = List.map param ff.f_args })
 				| _ -> ());