summaryrefslogtreecommitdiff
path: root/bytecomp
diff options
context:
space:
mode:
authorAlain Frisch <alain@frisch.fr>2019-04-01 09:34:35 +0200
committerXavier Leroy <xavierleroy@users.noreply.github.com>2019-04-01 09:34:35 +0200
commite350ebd7c9b5446401658bd967a011344112ffd3 (patch)
treea2bc29a8be79751cc50d3eec67cdcd695e97f56e /bytecomp
parentc7534721ddaf8478742d59613ef5c90d0f757be8 (diff)
downloadocaml-e350ebd7c9b5446401658bd967a011344112ffd3.tar.gz
Use Strict bindings when simplifying Lstaticraise (#8559)
Alias bindings were used before, but as #8558 shows this can be incorrect, as the argument to `Lstaticraise` may be impure. Adds a regression test. Closes: #8558
Diffstat (limited to 'bytecomp')
-rw-r--r--bytecomp/simplif.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/bytecomp/simplif.ml b/bytecomp/simplif.ml
index 3017541755..d57171e8b1 100644
--- a/bytecomp/simplif.ml
+++ b/bytecomp/simplif.ml
@@ -282,7 +282,7 @@ let simplify_exits lam =
xs ys Ident.Map.empty
in
List.fold_right2
- (fun (y, kind) l r -> Llet (Alias, kind, y, l, r))
+ (fun (y, kind) l r -> Llet (Strict, kind, y, l, r))
ys ls (Lambda.rename env handler)
with
| Not_found -> Lstaticraise (i,ls)