Re: [fpc-pascal] Two possible generics bugs

2019-11-28 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Fr., 29. Nov. 2019, 01:11: > > > > On Nov 28, 2019, at 6:38 PM, Sven Barth via fpc-pascal < > fpc-pascal@lists.freepascal.org> wrote: > > > > TFPGObjectList has a constraint to class types, so you need to constrain > your T as well using ": class". > > > > Pl

Re: [fpc-pascal] Two possible generics bugs

2019-11-28 Thread Ryan Joseph via fpc-pascal
> On Nov 28, 2019, at 6:38 PM, Sven Barth via fpc-pascal > wrote: > > TFPGObjectList has a constraint to class types, so you need to constrain your > T as well using ": class". > > Please note however that you'll likely encounter another bug then once you > move your function to a unit: ht

Re: [fpc-pascal] Two possible generics bugs

2019-11-28 Thread Sven Barth via fpc-pascal
Ryan Joseph via fpc-pascal schrieb am Do., 28. Nov. 2019, 20:36: > 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(sou

[fpc-pascal] Two possible generics bugs

2019-11-28 Thread Ryan Joseph via fpc-pascal
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(source: specialize TFPGList): specialize TFPGList; begin end; // ... but getting an er