> On Aug 26, 2020, at 5:44 PM, Nico Neumann via fpc-pascal
> <[email protected]> wrote:
>
> generic procedure Add<T>;
> begin
> if GetTypeKind(T) = tkInteger then WriteLn('an integer');
> if GetTypeKind(T) = tkString then WriteLn('a string');
> end;
Question for the compiler team why doesn't the "is" operator work for types? We
should be able to do:
if T is integer then
;
and get something which is well optimized.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal