From 2257d023478cd2fe44a0ff4d67c1c5b7e3b59061 Mon Sep 17 00:00:00 2001 From: Aymeric Fromherz Date: Fri, 31 May 2024 14:19:46 +0200 Subject: Add missing reverse when collapsing environment --- compiler/InterpreterBorrows.ml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'compiler') 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, -- cgit v1.2.3