When resolving names in flow contracts, we refine the ordinary analysis by
knowing that an overloaded name must refer to an abstract state and not a
function. However, when all overloadings refer to function, we shouldn't
crash, but instead let the error to be diagnosed later.
gcc/ada/ChangeLog:
* sem_prag.adb (Resolve_State): Continue ordinary processing.
State := Homonym (State);
end loop;
- -- A function can never act as a state. If the homonym chain does
- -- not contain a corresponding state, then something went wrong in
- -- the overloading mechanism.
-
- raise Program_Error;
+ -- A function can never act as a state; it will be diagnosed later
end if;
end if;
end Resolve_State;