POSSIBLE Bug/Unclear Docs: Generic interfaces/indefinite abstract tagged private

EDIT: I was wrong apparently on abstract so maybe it just broke with the generic package instance anyway as a type error. Still, read please I have a lot to potentially correct.

I am sorry if this is a known bug, if this is a clear hallucination on my part, or if this is just expected but not recommended “this way”

Basically, I wanted to define a simple reader in another project and I first tried the latter because I never tried it. I read the formal as such: Appendices - learn.adacore.com

“abstract” → this type has no fields

“tagged limited” → this is an object and copy-limited

“record” → usual dance

I am aware that (<>) is used in quite a few spots in the grammar. I have personally used it for emums in my generics, or slicing. But in short, I wanted to write a reader interface which could get the frozen data to be the handled by the function transform. I wanted to basically write a functor over generics. I believed this was an incorrect usage anyway but I tried it because I wanted to see if it would break.

In short, if you try to define a body w/ an overriding procedure/function, it will work but warn that the function is not dispatching or overriding. So I tried to rename the function and this is what caused it to break.

My guess this breaks the elaboration order of generics + undefined body cant dispatch without a concrete operation. I could be wrong:

Since I have dropped all other languages and gone all in mostly on Ada since I am making games, I figured I would make a repo for my minimum reproduction case. I don’t think this is a bug, just a bad implementation but i have tried quite a few combinations of 1. write the functions in the body w/concretes and immediately override (works but it kind of defeats the purpose of the generic) 2. write the functions in the main entry (also works but it gives a similar circular warning that it is not dispatching or that the function was not used).

It is quite a puzzle.

I think if I wanted to try this more seriously, I would skip the generic, use an interface/limited interface and just write concrete tagged records but again I am not sure what breaks here and I would like to ask a human rather then an LLM.

Repo: GitHub - UltimaTerra/errbox: A slop-second, human-first bug repo for any projects ranging from Ada, Nim, C3 and more. · GitHub

No implementation (and thus no fields) is interface.

For a type abstract means no instances.

For a subprogram abstract means no implementation if the controlled argument is tagged AKA “primitive” and disabled (hidden) otherwise. It is kind of inversed overriding / overloading.

type T is tagged ...;
procedure Foo (X : T); -- A primitive operation of T
...
generic
   type S is new T with private; -- Any type derived from T
package P is
   type Q is new S with ...; -- Deriving from S
   overriding procedure Foo (X : Q); -- Override Foo
  ...

You can add abstract to S since you are going to derive for it anyway.