Revision 307c32f5
Added by Pierre-Loïc Garoche almost 5 years ago
src/typing.ml | ||
---|---|---|
389 | 389 |
else ( |
390 | 390 |
type_dependent_call env in_main loc const f (List.combine args targs) |
391 | 391 |
) |
392 |
|
|
392 |
|
|
393 | 393 |
(* type a call with possible dependent types. [targs] is here a list of (argument, type) pairs. *) |
394 | 394 |
and type_dependent_call env in_main loc const f targs = |
395 | 395 |
(* Format.eprintf "Typing.type_dependent_call %s@." f; *) |
... | ... | |
494 | 494 |
check_constant expr.expr_loc const false; |
495 | 495 |
type_subtyping_arg env in_main const c (* Type_predef. *)type_bool); |
496 | 496 |
let args_list = expr_list_of_expr args in |
497 |
let touts = type_appl env in_main expr.expr_loc const id args_list in |
|
497 | 498 |
let targs = new_ty (Ttuple (List.map (fun a -> Expr_type_hub.import a.expr_type) args_list)) in |
498 | 499 |
args.expr_type <- Expr_type_hub.export targs; |
499 |
let touts = type_appl env in_main expr.expr_loc const id args_list in |
|
500 | 500 |
expr.expr_type <- Expr_type_hub.export touts; |
501 | 501 |
touts |
502 | 502 |
| Expr_fby (e1,e2) |
Also available in: Unified diff
MPFR bug solved: typing of function argument was not properly building tuples of types.