Skip to content

Commit e926aeb

Browse files
authored
Backport fix from PR#10719 (#342)
1 parent 0256599 commit e926aeb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ocaml/lambda/translcore.ml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -790,7 +790,8 @@ and transl_apply ~scopes
790790
let body =
791791
match build_apply handle ((Lvar id_arg, optional)::args') l with
792792
Lfunction{kind = Curried; params = ids; return;
793-
body = lam; attr; loc} ->
793+
body = lam; attr; loc}
794+
when List.length ids < Lambda.max_arity () ->
794795
Lfunction{kind = Curried;
795796
params = (id_arg, Pgenval)::ids;
796797
return;

0 commit comments

Comments
 (0)