summaryrefslogtreecommitdiff
path: root/compiler/InterpreterPaths.ml
diff options
context:
space:
mode:
authorEscherichia2024-03-27 10:22:06 +0100
committerEscherichia2024-03-28 15:35:20 +0100
commit0f0082c81db8852dff23cd4691af19c434c8be78 (patch)
treeeaf4c6e6faaceaeaf86e47b7b61249f86c08f65d /compiler/InterpreterPaths.ml
parentc47e349dedaaf0e3161869740ea769332ffd24ca (diff)
Added sanity_check and sanity_check_opt_meta helpers and changed sanity checks related cassert to these helpers to have a proper error message
Diffstat (limited to 'compiler/InterpreterPaths.ml')
-rw-r--r--compiler/InterpreterPaths.ml4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/InterpreterPaths.ml b/compiler/InterpreterPaths.ml
index 6ec12d6f..3733c06d 100644
--- a/compiler/InterpreterPaths.ml
+++ b/compiler/InterpreterPaths.ml
@@ -603,7 +603,7 @@ let drop_outer_loans_at_lplace (config : config) (meta : Meta.meta) (p : place)
(* Reinsert *)
let ctx = write_place meta access p v ctx in
(* Sanity check *)
- cassert (not (outer_loans_in_value v)) meta "TODO: Error message";
+ sanity_check (not (outer_loans_in_value v)) meta;
(* Continue *)
cf ctx)
in
@@ -627,7 +627,7 @@ let prepare_lplace (config : config) (meta : Meta.meta) (p : place) (cf : typed_
fun ctx ->
let v = read_place meta access p ctx in
(* Sanity checks *)
- cassert (not (outer_loans_in_value v)) meta "TODO: Error message";
+ sanity_check (not (outer_loans_in_value v)) meta;
(* Continue *)
cf v ctx
in