In fcl-passrc, TPasWriter.WriteElement does not correctly write declararions and staments consisting of free-standing specialized generic procedures
In fcl-passrc, the method TPasWriter.WriteElement (unit PasWrite) does not correctly write declarations and staments consisting of free-standing specialized generic procedures.
For example, given the following program:
unit test;
{$mode ObjFpc}
interface
generic procedure Proc<T, U> (X : T; Y : U);
implementation
generic procedure Proc<T, U>(X : T; Y : U);
begin
end;
procedure ProcGen;
begin
specialize Proc<integer,char>(1,'A');
end;
end.
The declaration of generic procedure Proc<T, U> (X : T; Y : U);
is shown as follows:
procedure Proc(X: T; Y: U);
The body of ProcGen is shown as follows:
procedure ProcGen;
begin
specialize Proc<,>(1, 'A');
end;`
See attached zip to reproduce bug.
Edited by simone