summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJon French2018-04-23 16:01:40 +0100
committerJon French2018-05-01 16:54:54 +0100
commita9c5ebc1c1c0943f48c31831f95dd4d1d61b8dc3 (patch)
tree3b9ef39fb81aa591cde29470bd14121caad4e0f7 /src
parent319c6c6e922965cc02de969f1ce9e1e4fd0ac1d5 (diff)
fix refactored rewrite_pexp_with_guards (where type information is and is not...)
Diffstat (limited to 'src')
-rw-r--r--src/rewrites.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rewrites.ml b/src/rewrites.ml
index 1ab2a9e0..591bc276 100644
--- a/src/rewrites.ml
+++ b/src/rewrites.ml
@@ -2786,13 +2786,13 @@ let rewrite_pexp_with_guards rewrite_pat (Pat_aux (pexp_aux, (annot: tannot anno
| [] -> pexp
| gs ->
let unchecked_pexp = mk_pexp (Pat_when (strip_pat pat, List.map strip_exp gs |> fold_guards, strip_exp exp)) in
- check_case (env_of_annot annot) (pat_typ_of pat) unchecked_pexp (typ_of_annot annot)
+ check_case (pat_env_of pat) (pat_typ_of pat) unchecked_pexp (typ_of exp)
end
| Pat_when (pat, guard, exp) ->
begin
let pat = fold_pat { id_pat_alg with p_aux = rewrite_pat guards } pat in
let unchecked_pexp = mk_pexp (Pat_when (strip_pat pat, List.map strip_exp !guards |> fold_guards, strip_exp exp)) in
- check_case (env_of_annot annot) (pat_typ_of pat) unchecked_pexp (typ_of_annot annot)
+ check_case (pat_env_of pat) (pat_typ_of pat) unchecked_pexp (typ_of exp)
end