[fpc-pascal] generic proc inference

Ryan Joseph genericptr at gmail.com
Sun Oct 6 23:10:54 CEST 2019



> On Oct 6, 2019, at 5:03 PM, Ryan Joseph <genericptr at gmail.com> wrote:
> 
>> On Oct 6, 2019, at 2:06 PM, Mattias Gaertner via fpc-pascal <fpc-pascal at lists.freepascal.org> wrote:
>> 
>> 1.
>> FPC allows default params, Delphi does not. Nice.
>> I see no tests for this though, so maybe this was not on purpose?
> 
> Probably an oversight if you can believe it. I’ll test that.

Yeah this didn’t work so I need to think about it. Should it even be allowed though? That means the type can only be specialized the same as the constant?

generic procedure DoThis<T>(param1: string; param2: T = 100);
begin
end;


Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list