|
@@ -278,9 +278,8 @@ let traverse gen ?tparam_anon_decl ?tparam_anon_acc (handle_anon_func:texpr->tfu
|
|
|
|
|
|
let rec get_type_params acc t =
|
|
let rec get_type_params acc t =
|
|
match t with
|
|
match t with
|
|
- | TInst(( { cl_kind = KTypeParameter constraints } as cl), []) ->
|
|
|
|
- let params = List.fold_left get_type_params acc constraints in
|
|
|
|
- List.filter (fun t -> not (List.memq t acc)) (cl :: params) @ acc;
|
|
|
|
|
|
+ | TInst(( { cl_kind = KTypeParameter _ } as cl), []) ->
|
|
|
|
+ if List.memq cl acc then acc else cl :: acc
|
|
| TFun (params,tret) ->
|
|
| TFun (params,tret) ->
|
|
List.fold_left get_type_params acc ( tret :: List.map (fun (_,_,t) -> t) params )
|
|
List.fold_left get_type_params acc ( tret :: List.map (fun (_,_,t) -> t) params )
|
|
| TDynamic None ->
|
|
| TDynamic None ->
|