mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-07 17:47:56 +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
440 B
ObjectPascal
25 lines
440 B
ObjectPascal
{%FAIL}
|
|
{$mode objfpc}
|
|
{$modeswitch implicitfunctionspecialization}
|
|
{
|
|
Test specializing proc vars with constant parameters
|
|
NOTE: currently not supported and therefore should fail
|
|
}
|
|
|
|
program timpfuncspez15;
|
|
|
|
type
|
|
generic TProc<T; const U: integer> = procedure(value: T = U);
|
|
|
|
generic procedure Run<T>(proc: specialize TProc<T, 10>);
|
|
begin
|
|
proc();
|
|
end;
|
|
|
|
procedure DoCallback(value: integer);
|
|
begin
|
|
end;
|
|
|
|
begin
|
|
Run(@DoCallback);
|
|
end. |