fpc/tests/test/timpfuncspez31.pp
Sven/Sarah Barth 90844c2027 * fix : apply slightly adjusted changes by Ryan Joseph to implement support for implicit generic function specializations
The main adjustments were as follows:
  - fixing coding style and identation
  - fixing some typos
  - using a better name for the property in tcallcandidates which holds the symbols created for anonymous parameter values
2022-04-20 18:59:31 +02:00

25 lines
397 B
ObjectPascal

{%FAIL}
{$mode objfpc}
{$modeswitch implicitfunctionspecialization}
{
All generic parameters must be used in the paramter list
}
program timpfuncspez31;
type
generic TProc<S> = procedure(name: S);
generic procedure Run<T>(proc: specialize TProc<String>);
begin
proc('TProc');
end;
procedure DoCallback(name: String);
begin
writeln(name, ' called');
end;
begin
Run(@DoCallback);
end.