diff --git a/ocaml/lambda/translcore.ml b/ocaml/lambda/translcore.ml index 1dffaeb5dc7..aa0177c78ca 100644 --- a/ocaml/lambda/translcore.ml +++ b/ocaml/lambda/translcore.ml @@ -790,7 +790,8 @@ and transl_apply ~scopes let body = match build_apply handle ((Lvar id_arg, optional)::args') l with Lfunction{kind = Curried; params = ids; return; - body = lam; attr; loc} -> + body = lam; attr; loc} + when List.length ids < Lambda.max_arity () -> Lfunction{kind = Curried; params = (id_arg, Pgenval)::ids; return;