mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 18:09:24 +02:00

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
25 lines
397 B
ObjectPascal
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. |