fpc/tests/test/tfuncref37.pp

25 lines
288 B
ObjectPascal

{ %FAIL }
program tfuncref37;
{$mode objfpc}
{$ModeSwitch functionreferences}
type
TFuncRef = reference to function: LongInt;
function Test(var aArg: LongInt): TFuncRef;
function TestSub: LongInt;
begin
Result := aArg;
end;
begin
Result := @TestSub;
end;
begin
end.