I have a record and wanted some accessor function for it.
package Some_Package is
type A is tagged record
First_Field : Integer;
Second_Field : Character;
end record;
type B is private;
function Some_A (Some_B : B) return A;
private
type B is tagged record
Some_A : A;
end record;
end Some_Package;
And here's what GNAT gives me:
some_package.ads:10:13: operation can be dispatching in only one type
This error is somewhat cryptic for Ada newbie and I'd appreciate some explanation what I did wrong and how to do it correctly.