Delphi Error – E2530 Type parameters not allowed on global procedure or function

Delphi Compiler Error

E2530 Type parameters not allowed on global procedure or function

Reason for the Error & Solution

This occurs when declaring a generic procedure/function in the global scope.

program E2530;
{E2530 Type parameters not allowed on global procedure or function}
{$APPTYPE CONSOLE}

uses
  SysUtils;

procedure GenProc <T> (value: T);
begin
end;

begin

end.