浏览代码

use the same monomorphs for each inline type mapping (see #2874)

Simon Krajewski 11 年之前
父节点
当前提交
aa160e0ef0
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      typer.ml

+ 2 - 1
typer.ml

@@ -698,7 +698,8 @@ let make_call ctx e params t p =
 				begin match t with
 				begin match t with
 					| TAbstract(a,pl) ->
 					| TAbstract(a,pl) ->
 						let has_params = a.a_types <> [] || f.cf_params <> [] in
 						let has_params = a.a_types <> [] || f.cf_params <> [] in
-						let map_type = fun t -> apply_params a.a_types pl (monomorphs f.cf_params t) in
+						let monos = List.map (fun _ -> mk_mono()) f.cf_params in
+						let map_type = fun t -> apply_params a.a_types pl (apply_params f.cf_params monos t) in
 						Some (has_params,map_type)
 						Some (has_params,map_type)
 					| _ ->
 					| _ ->
 						None
 						None