summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Campbell2018-05-04 16:12:28 +0100
committerBrian Campbell2018-05-04 16:12:28 +0100
commit09bfbe239b1b5d8627f84a8115cfaf9f83114ba5 (patch)
treec9da4b4418d9a19982a3053849b2c04266806342
parent1653f1816406f9b70de66f9b2427df71f1c5a1a2 (diff)
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.
-rw-r--r--src/monomorphise.ml2
1 files changed, 1 insertions, 1 deletions
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,_); _;