diff options
author | Aymeric Fromherz | 2024-05-31 14:19:46 +0200 |
---|---|---|
committer | Aymeric Fromherz | 2024-05-31 14:19:46 +0200 |
commit | 2257d023478cd2fe44a0ff4d67c1c5b7e3b59061 (patch) | |
tree | 29f77459e2b0e59450098a9d7f05472a242bcd10 /compiler | |
parent | e2afa2a24b290a55451431373152bf5a26c78d24 (diff) |
Add missing reverse when collapsing environment
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/InterpreterBorrows.ml | 3 |
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, |