Project

General

Profile

Revision 06fa8b5e

View differences:

src/typing.ml
309 309
(*Format.eprintf "subtyping const %B real %a:%a vs formal %a@." const Printers.pp_expr real_arg Types.print_ty real_type Types.print_ty formal_type;*)
310 310
  let real_types   = type_list_of_type real_type in
311 311
  let formal_types = type_list_of_type formal_type in
312
  try
313
    List.iter2 (type_subtyping loc sub) real_types formal_types
314
  with _ -> raise (Unify (real_type, formal_type))
312
  if (List.length real_types) <> (List.length formal_types)
313
  then raise (Unify (real_type, formal_type))
314
  else List.iter2 (type_subtyping loc sub) real_types formal_types
315 315

  
316 316
and type_subtyping loc sub real_type formal_type =
317 317
  match (repr real_type).tdesc, (repr formal_type).tdesc with

Also available in: Unified diff