It seems this is a bug? It should work but it doesn’t for some reason.
namespace ConsoleApplication4;
interface
procedure ToString<T>(const A: T);
implementation
procedure ToString<T>(const A: T);
begin
case typeOf(T) of
Integer: writeLn('Using type Integer');
String: writeLn('Using type String');
end;
end;
begin
ToString<Integer>(1);
end.