[fpc-pascal] TypeInfo on generic templates

Ryan Joseph genericptr at gmail.com
Fri Oct 30 03:07:45 CET 2020



> On Oct 29, 2020, at 12:27 PM, Ryan Joseph <genericptr at gmail.com> wrote:
> 
> Is it possible that the TypeInfo intrinsic could work with generic template types or is this a bug? I get "Illegal qualifier" in the procedure below.
> 
> generic procedure DoThis<T>(a: array of T);
> begin
>  writeln(TypeInfo(T)^.name);
> end;

Oops I think you're right, I was just using TypeInfo wrong (should cast to PTypeInfo). Please disregard.


Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list