fpc/tests/test/timpfuncspez15.pp
Sven/Sarah Barth 90844c2027 * fix #35261: 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
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.