[fpc-pascal] Implicit generic specializations

Ryan Joseph ryan at thealchemistguild.com
Sun Dec 2 15:35:20 CET 2018


I just tested and my code has the same behavior as the explicit specialization (as expected), i.e. last wins, regardless of generic status.

procedure DoThis(msg:integer);
begin
	writeln('DoThis:',msg);
end;

generic procedure DoThis<T>(msg:T);
begin
	writeln('DoThis$1#1:',msg);
end;

begin
	specialize DoThis<integer>(1);	// DoThis$1#1:1
end.

Regards,
	Ryan Joseph




More information about the fpc-pascal mailing list