From 09bfbe239b1b5d8627f84a8115cfaf9f83114ba5 Mon Sep 17 00:00:00 2001 From: Brian Campbell Date: Fri, 4 May 2018 16:12:28 +0100 Subject: Fix mono cast introduction to avoid a checking to inference change Adds return type to pattern so that the original function body is still type checked, rather than switching to type inference which may fail. --- src/monomorphise.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/monomorphise.ml b/src/monomorphise.ml index c743ac61..fcace50f 100644 --- a/src/monomorphise.ml +++ b/src/monomorphise.ml @@ -3781,7 +3781,7 @@ let make_bitvector_cast_fns env src_typ target_typ = match src_t, tar_t with | Typ_tup typs, Typ_tup typs' -> let ps,es = List.split (List.map2 aux typs typs') in - P_aux (P_tup ps,(Generated src_l, src_ann)), + P_aux (P_typ (src_typ, P_aux (P_tup ps,(Generated src_l, src_ann))),(Generated src_l, src_ann)), E_aux (E_tuple es,(Generated tar_l, tar_ann)) | Typ_app (Id_aux (Id "vector",_), [Typ_arg_aux (Typ_arg_nexp size,_); _; -- cgit v1.2.3