[fpc-pascal] Calling undefined function pointers in generics

Hairy Pixels genericptr at gmail.com
Sun Jun 19 05:05:54 CEST 2022


This code snippet will give a compiler error "Syntax error, ";" expected but "(“ found”. It’s an unspecialized generic type so I would think it should compile and only attempt to validate the parameters when the function is specialized.

generic procedure Perform<T>(func: T);
begin
  func(1);
end;

Regards,
	Ryan Joseph



More information about the fpc-pascal mailing list