diff --git a/src/typing/generic.ml b/src/typing/generic.ml index cf5c7befadd..6f12c785a94 100644 --- a/src/typing/generic.ml +++ b/src/typing/generic.ml @@ -455,10 +455,6 @@ let type_generic_function ctx fa fcc with_type p = let fc_type = build_instances ctx fcc.fc_type p in let name = cf.cf_name ^ "_" ^ gctx.name in let params = extract_type_parameters monos in - let clones = List.map (fun ttp -> - let name_path = if (fst ttp.ttp_class.cl_path) = [cf.cf_name] then ([name],ttp.ttp_name) else ttp.ttp_class.cl_path in - clone_type_parameter gctx c.cl_module name_path ttp - ) params in let unify_existing_field tcf pcf = try unify_raise tcf fc_type p with Error ({ err_message = Unify _; err_depth = depth } as err) -> @@ -514,7 +510,7 @@ let type_generic_function ctx fa fcc with_type p = | _ -> true ) cf.cf_meta in cf2.cf_meta <- (Meta.NoCompletion,[],p) :: (Meta.NoUsing,[],p) :: (Meta.GenericInstance,[],p) :: meta; - cf2.cf_params <- clones + cf2.cf_params <- params in let mk_cf2 name = mk_field ~static:stat name fc_type cf.cf_pos cf.cf_name_pos