Project

General

Profile

« Previous | Next » 

Revision 719f9992

Added by Xavier Thirioux over 7 years ago

clean handling of undefined node application

git-svn-id: https://cavale.enseeiht.fr/svn/lustrec/lustre_compiler/trunk@261 041b043f-8d7c-46b2-b46e-ef0dd855326e

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