From 937d1f580b686239d6549d1f15d5889a44d601a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9onard=20G=C3=A9rard?= Date: Sun, 12 Sep 2010 23:58:21 +0200 Subject: [PATCH] Add Warning when encountering not typed expression when cloking. --- compiler/global/clocks.ml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/compiler/global/clocks.ml b/compiler/global/clocks.ml index 4519834..7c1edcd 100644 --- a/compiler/global/clocks.ml +++ b/compiler/global/clocks.ml @@ -92,7 +92,10 @@ and unify_list t1_list t2_list = try List.iter2 unify t1_list t2_list with | _ -> raise Unify let rec skeleton ck = function - | Tprod ty_list -> Cprod (List.map (skeleton ck) ty_list) + | Tprod ty_list -> + (match ty_list with + | [] -> Format.eprintf "Warning, an exp with void type@."; Ck ck + | _ -> Cprod (List.map (skeleton ck) ty_list)) | Tarray _ | Tid _ -> Ck ck let ckofct = function | Ck ck -> ck_repr ck | Cprod ct_list -> Cbase