summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon French2018-09-17 13:50:30 +0100
committerJon French2018-09-17 13:50:30 +0100
commit4d410d7c2497d89efe6e756bec035ee5b0e8ba04 (patch)
tree16941992c7ad938c4cd7e3fb41caefd81a596be0 /src
parent9f1b822cb91e17741d6f11a87a374e28ded2960a (diff)
Rewrites.rewrite_defs_mapping_patterns: emit an explicit type annotation on the generated pattern so re-typechecking works
Diffstat (limited to 'src')
-rw-r--r--src/rewrites.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/rewrites.ml b/src/rewrites.ml
index eafbd6a8..f4e5d346 100644
--- a/src/rewrites.ml
+++ b/src/rewrites.ml
@@ -3384,7 +3384,7 @@ let rewrite_defs_mapping_patterns =
(annot_exp (E_let (new_letbind, fold_typed_guards env guards)) unk env bool_typ),
false_exp)) unk env bool_typ in
- annot_pat (P_id s_id) unk env mapping_in_typ, [new_guard; new_other_guards], new_let
+ annot_pat (P_typ (mapping_in_typ, annot_pat (P_id s_id) unk env mapping_in_typ)) unk env mapping_in_typ, [new_guard; new_other_guards], new_let
| P_aux (P_as (inner_pat, inner_id), p_annot) ->
let inner_pat, guards, expr = rewrite_pat env (inner_pat, guards, expr) in