summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAymeric Fromherz2024-05-31 14:19:46 +0200
committerAymeric Fromherz2024-05-31 14:19:46 +0200
commit2257d023478cd2fe44a0ff4d67c1c5b7e3b59061 (patch)
tree29f77459e2b0e59450098a9d7f05472a242bcd10
parente2afa2a24b290a55451431373152bf5a26c78d24 (diff)
Add missing reverse when collapsing environment
-rw-r--r--compiler/InterpreterBorrows.ml3
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/InterpreterBorrows.ml b/compiler/InterpreterBorrows.ml
index 653dea7c..a31d36cd 100644
--- a/compiler/InterpreterBorrows.ml
+++ b/compiler/InterpreterBorrows.ml
@@ -2720,8 +2720,7 @@ let merge_into_abstraction_aux (span : Meta.span) (abs_kind : abs_kind)
| Some lc1 -> push_avalue (merge_g_loan_contents lc0 lc1)))
borrows_loans;
- (* We traversed and pushed elements in the same order as the traversal, so we do not need to reverse the list *)
- let avalues = !avalues in
+ let avalues = List.rev !avalues in
(* Reorder the avalues. We want the avalues to have the borrows first, then
the loans (this structure is more stable when we merge abstractions together,