mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 00:48:37 +02:00
27 lines
282 B
ObjectPascal
27 lines
282 B
ObjectPascal
{ %FAIL }
|
|
|
|
program tfuncref39;
|
|
|
|
{$mode objfpc}
|
|
{$ModeSwitch functionreferences}
|
|
|
|
type
|
|
TProcRef = reference to procedure;
|
|
|
|
generic function Test<T>: LongInt;
|
|
|
|
procedure TestSub;
|
|
begin
|
|
Writeln(Result);
|
|
end;
|
|
|
|
var
|
|
tmp: TProcRef;
|
|
begin
|
|
tmp := @TestSub;
|
|
end;
|
|
|
|
begin
|
|
end.
|
|
|