From 28f2c31d146afb7d4cece08a411317eb05a1f963 Mon Sep 17 00:00:00 2001 From: Brian Campbell Date: Mon, 2 Apr 2018 17:06:34 +0100 Subject: Add bitvector casts to funcl bodies when necessary --- src/monomorphise.ml | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/monomorphise.ml b/src/monomorphise.ml index 8ff5dc20..9cd55ea3 100644 --- a/src/monomorphise.ml +++ b/src/monomorphise.ml @@ -3807,6 +3807,10 @@ let add_bitvector_casts (Defs defs) = in let pat,guard,body,annot = destruct_pexp pexp in let body = rewrite_body ret_typ body in + (* Also add a cast around the entire function clause body, if necessary *) + let body = + make_bitvector_cast_exp (fill_in_type (env_of body) (typ_of body)) ret_typ body + in let pexp = construct_pexp (pat,guard,body,annot) in FCL_aux (FCL_Funcl (id,pexp),fcl_ann) in -- cgit v1.2.3