I’m trying to instantiate a generic hash map package in SPARK. The instantiation compiles as legal Ada, but SPARK is giving me the additional error
error: unmatched actual in instantiation of “Formal_Hashed_Maps” declared at a-cfhama.ads:33
package Boolean_Maps is new Ada.Containers.Formal_Hashed_Maps(Module_ID_Type, Boolean, Hash_Func, Equivalent_Key, Standard.“=”);
with a red underline under
Module_ID_Type is defined in a non-generic package as
type Module_ID_Type is new Positive range 1..255. I’m using the GNAT compiler. The code compiles and works as expected.
What does this error mean?
2 posts - 2 participants