[fpc-pascal] Extraneous generic parameters

Ryan Joseph genericptr at gmail.com
Sun Mar 14 19:10:29 CET 2021


This program compiles, but is it a bug? I would think the specialization should fail because "S" in TArray is not specified.

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

{$mode objfpc}

type
  generic TArray<T, S> = array of T;
  
generic procedure DoThis<T>(param: specialize TArray<specialize TArray<T>>);
begin
end;

begin
  specialize DoThis<integer>([[1],[2],[3]]);
end.

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list