|
@@ -582,8 +582,19 @@ let select_overload gen applied_f overloads types params =
|
|
|
| (t,cf) :: _ -> cf,t,false
|
|
|
| _ -> assert false
|
|
|
|
|
|
+let rec cur_ctor c tl =
|
|
|
+ match c.cl_constructor with
|
|
|
+ | Some ctor ->
|
|
|
+ ctor, c, tl
|
|
|
+ | None ->
|
|
|
+ match c.cl_super with
|
|
|
+ | None ->
|
|
|
+ raise Not_found
|
|
|
+ | Some (sup,stl) ->
|
|
|
+ cur_ctor sup (List.map (apply_params c.cl_params tl) stl)
|
|
|
+
|
|
|
let choose_ctor gen cl tparams etl maybe_empty_t p =
|
|
|
- let ctor, sup, stl = OverloadingConstructor.cur_ctor cl tparams in
|
|
|
+ let ctor, sup, stl = cur_ctor cl tparams in
|
|
|
(* get returned stl, with Dynamic as t_empty *)
|
|
|
let rec get_changed_stl c tl =
|
|
|
if c == sup then
|