Delphi Compiler Error
E2508 type parameters not allowed on this type
Reason for the Error & Solution
When using class references, you cannot use generic classes directly. You need to use a wrapper class to be able to use generics.
program E2508;
{$APPTYPE CONSOLE}
uses
SysUtils;
type
TMyClass = class
end;
TMyClassClass<T> = class of TMyClass;
begin
Writeln('FAIL - E2508 type parameters not allowed on this type');
end.