Skip to content

Commit

Permalink
unify existing generic specializations with expected function type (f…
Browse files Browse the repository at this point in the history
…ixed issue HaxeFoundation#1263)
  • Loading branch information
Simn committed Nov 3, 2012
1 parent f769b9b commit 7f29d05
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion typer.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1051,7 +1051,9 @@ let type_generic_function ctx (e,cf) el p =
let gctx = Codegen.make_generic ctx cf.cf_params monos p in
let name = cf.cf_name ^ "_" ^ gctx.Codegen.name in
let cf2 = try
PMap.find name (if stat then c.cl_statics else c.cl_fields)
let cf2 = PMap.find name (if stat then c.cl_statics else c.cl_fields) in
unify ctx cf2.cf_type t cf2.cf_pos;
cf2
with Not_found ->
let cf2 = mk_field name t cf.cf_pos in
if stat then begin
Expand Down

0 comments on commit 7f29d05

Please sign in to comment.