[fpc-pascal] Two possible generics bugs

Ryan Joseph genericptr at gmail.com
Thu Nov 28 16:14:56 CET 2019


Testing on 3.3.1. Are these both bugs? I wanted to ask first before filing a report.

{$mode objfpc}

program test;
uses
  FGL;

// No Error specializing TFPGList in parameter list...
generic function CopyList<T>(source: specialize TFPGList<T>): specialize TFPGList<T>;
begin
end;

// ... but getting an error specializing TFPGObjectList in parameter list
// Class type expected, but got "T"
generic function CopyList<T>(source: specialize TFPGObjectList<T>): specialize TFPGObjectList<T>;
begin
end;

begin
end.

===========================

{$mode objfpc}

program test;
uses
  FGL;

// Type identifier expected
// Internal error 2019112401
generic function CopyList<T>(source: specialize FGL.TFPGObjectList<T>): specialize FGL.TFPGObjectList<T>;
begin
end;

begin
end.


Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list