Project

General

Profile

Revision 719f9992 src/typing.ml

View differences:

src/typing.ml
434 434

  
435 435
(* type a (single) call. [args] is here a list of arguments. *)
436 436
and type_call env in_main loc const f args =
437
  let tfun = type_ident env in_main loc const f in
438
  let tins, touts = split_arrow tfun in
437
  let tins, touts = new_var (), new_var () in
438
  let tfun = Type_predef.type_arrow tins touts in
439
  type_subtyping_arg env in_main const (expr_of_ident f loc) tfun;
439 440
  let tins = type_list_of_type tins in
440 441
  if List.length args <> List.length tins then
441 442
    raise (Error (loc, WrongArity (List.length args, List.length tins)))

Also available in: Unified diff