summaryrefslogtreecommitdiff
path: root/src/InterpreterBorrows.ml
diff options
context:
space:
mode:
authorSon Ho2022-06-27 06:51:08 +0200
committerSon Ho2022-06-27 06:51:08 +0200
commit8c3dc80d255ba2000d35c0bcdf9dbe927215bb81 (patch)
treee9cb13746a230666d9a6bd258a0e94f1e9772191 /src/InterpreterBorrows.ml
parentf24f1043e72cddad2b29b09b79649ffc5e1d7c42 (diff)
Add `can_end` in `abs` and use it for the return abs when generating the
backward functions
Diffstat (limited to 'src/InterpreterBorrows.ml')
-rw-r--r--src/InterpreterBorrows.ml3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/InterpreterBorrows.ml b/src/InterpreterBorrows.ml
index f5f3a8fa..26374bf7 100644
--- a/src/InterpreterBorrows.ml
+++ b/src/InterpreterBorrows.ml
@@ -985,6 +985,9 @@ and end_abstraction (config : C.config) (chain : borrow_or_abs_ids)
(* Lookup the abstraction *)
let abs = C.ctx_lookup_abs ctx abs_id in
+ (* Check that we can end the abstraction *)
+ assert abs.can_end;
+
(* End the parent abstractions first *)
let cc = end_abstractions config chain abs.parents in
let cc =