diff options
| author | Jedidiah Barber <contact@jedbarber.id.au> | 2026-01-19 18:50:55 +1300 |
|---|---|---|
| committer | Jedidiah Barber <contact@jedbarber.id.au> | 2026-01-19 18:50:55 +1300 |
| commit | 09f522deb502e3675a4f5daa26c6c8fafb91144e (patch) | |
| tree | 5ae85e8168b4ea20eadc566b2605ff40799fa6cf /src/kompsos.adb | |
| parent | d92265949acc35e78d51fd868da967222e458270 (diff) | |
Fixed oversight in Resolve_First after switch to using a Vector in State
Diffstat (limited to 'src/kompsos.adb')
| -rw-r--r-- | src/kompsos.adb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/kompsos.adb b/src/kompsos.adb index ae7848d..87c8555 100644 --- a/src/kompsos.adb +++ b/src/kompsos.adb @@ -591,7 +591,18 @@ package body Kompsos is if Subst.Actual.Is_Empty then return Empty_Term; else - return Subst.Actual.First_Element.Elem.Resolve (Subst); + declare + Min_Pos : Long_Positive := Subst.Actual.First_Index; + Min_Var : Variable := Subst.Actual.First_Element.Key; + begin + for Index in Subst.Actual.First_Index + 1 .. Subst.Actual.Last_Index loop + if Subst.Actual (Index).Key < Min_Var then + Min_Pos := Index; + Min_Var := Subst.Actual (Index).Key; + end if; + end loop; + return Subst.Actual (Min_Pos).Elem.Resolve (Subst); + end; end if; end Resolve_First; |
