summaryrefslogtreecommitdiff
path: root/compiler/FunsAnalysis.ml
diff options
context:
space:
mode:
authorEscherichia2024-03-27 10:22:06 +0100
committerEscherichia2024-03-28 15:35:20 +0100
commit0f0082c81db8852dff23cd4691af19c434c8be78 (patch)
treeeaf4c6e6faaceaeaf86e47b7b61249f86c08f65d /compiler/FunsAnalysis.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/FunsAnalysis.ml')
-rw-r--r--compiler/FunsAnalysis.ml2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/FunsAnalysis.ml b/compiler/FunsAnalysis.ml
index 14185a3d..f3840a8c 100644
--- a/compiler/FunsAnalysis.ml
+++ b/compiler/FunsAnalysis.ml
@@ -145,7 +145,7 @@ let analyze_module (m : crate) (funs_map : fun_decl FunDeclId.Map.t)
end
in
(* Sanity check: global bodies don't contain stateful calls *)
- cassert ((not f.is_global_decl_body) || not !stateful) f.meta "Global bodies should not contain stateful calls";
+ sanity_check ((not f.is_global_decl_body) || not !stateful) f.meta;
let builtin_info = get_builtin_info f in
let has_builtin_info = builtin_info <> None in
group_has_builtin_info := !group_has_builtin_info || has_builtin_info;