From 0dd4de8518151a6cbcc310e5495a7828ccc5fbe6 Mon Sep 17 00:00:00 2001 From: Jedidiah Barber Date: Mon, 5 Jan 2026 20:56:56 +1300 Subject: Very slight improvement to Unify checks --- src/kompsos-collector.adb | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/kompsos-collector.adb b/src/kompsos-collector.adb index e2ee677..b076679 100644 --- a/src/kompsos-collector.adb +++ b/src/kompsos-collector.adb @@ -7,6 +7,7 @@ with + Ada.Assertions, Ada.Unchecked_Deallocation; @@ -98,11 +99,8 @@ package body Kompsos.Collector is Real_Right : Term'Class := Right; begin -- Check for Variable validity with respect to State - if not Fully_Contains (Potential, Real_Left) or - not Fully_Contains (Potential, Real_Right) - then - return False; - end if; + pragma Assert (Fully_Contains (Potential, Real_Left)); + pragma Assert (Fully_Contains (Potential, Real_Right)); -- Resolve Variable substitution if Left.Kind = Var_Term then @@ -145,6 +143,10 @@ package body Kompsos.Collector is -- Not sure how things get here, but if all else fails return False; + + exception + when Ada.Assertions.Assertion_Error => + return False; end Do_Unify; -- cgit