We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0d5be2 commit 4197fcbCopy full SHA for 4197fcb
compiler/lib/inline.ml
@@ -612,9 +612,11 @@ and inline_function ~context i x f args rem state =
612
context.live_vars.(Var.idx f) <- context.live_vars.(Var.idx f) - 1;
613
let p, params, cont =
614
if context.live_vars.(Var.idx f) > 0
615
- then
616
- let p, _, params, cont = Duplicate.closure p ~f ~params ~cont in
617
- p, params, cont
+ then (
+ let p, _f, params, cont = Duplicate.closure p ~f ~params ~cont in
+ (* It's ok to ignore the [_f] because the function is not recursive *)
618
+ assert (not info.recursive);
619
+ p, params, cont)
620
else p, params, cont
621
in
622
let p = inline_recursively ~context ~info p params cont args in
0 commit comments