Skip to content

Commit

Permalink
Ensure that build_apply respects Lambda.max_arity
Browse files Browse the repository at this point in the history
  • Loading branch information
stedolan committed Oct 20, 2021
1 parent 8aa88d2 commit 5a60ce8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lambda/translcore.ml
Expand Up @@ -734,6 +734,7 @@ and transl_apply ~scopes
match build_apply handle ((Lvar id_arg, optional)::args') l with
Lfunction{kind = Curried; params = ids; return;
body = lam; attr; loc}
when List.length ids < Lambda.max_arity () ->
lfunction ~kind:Curried
~params:((id_arg, Pgenval)::ids)
~return
Expand Down

0 comments on commit 5a60ce8

Please sign in to comment.