diff options
| author | Jedidiah Barber <contact@jedbarber.id.au> | 2026-01-05 20:56:56 +1300 |
|---|---|---|
| committer | Jedidiah Barber <contact@jedbarber.id.au> | 2026-01-05 20:56:56 +1300 |
| commit | 0dd4de8518151a6cbcc310e5495a7828ccc5fbe6 (patch) | |
| tree | 9fca63071ae9b7068b011e1a993d5081b2c8b103 /src | |
| parent | d9a59f478a9ebb6135a2c9bbe2e6e1b946bfbaa4 (diff) | |
Very slight improvement to Unify checks
Diffstat (limited to 'src')
| -rw-r--r-- | src/kompsos-collector.adb | 12 |
1 files 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; |
