Skip to content

Commit

Permalink
fix calculation of ownership
Browse files Browse the repository at this point in the history
  • Loading branch information
artoy committed Mar 21, 2024
1 parent bcdd83e commit c44a49a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ownershipInference.ml
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ let rec process_expr ~output ((e_id,_),expr) ~o_arity =
in
let%bind (ol1, ol2) = split_loop ol [] [] in
let%bind o_copied = alloc_ovar (MGen e_id) (P.var v) in
add_constraint (Eq (o_copied, List.hd @@ List.rev ol1)) >>
add_constraint (Eq (o_copied, List.hd @@ List.rev ol2)) >>
return (IntList ol1, Ref(IntList((List.tl ol2) @ [o_copied]), List.hd ol2))
| _ -> failwith "The value pattern matched must be IntList"
in
Expand Down

0 comments on commit c44a49a

Please sign in to comment.