mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 18:09:24 +02:00
27 lines
334 B
ObjectPascal
27 lines
334 B
ObjectPascal
{ %FAIL }
|
|
|
|
program tanonfunc49;
|
|
|
|
{$mode objfpc}
|
|
{$modeswitch anonymousfunctions}
|
|
{$modeswitch functionreferences}
|
|
|
|
{ out parameters can't be captured }
|
|
|
|
type
|
|
TProc = reference to procedure;
|
|
|
|
procedure Test(out aArg);
|
|
var
|
|
p: TProc;
|
|
begin
|
|
p := procedure
|
|
begin
|
|
PLongInt(@aArg)^ := 42;
|
|
end;
|
|
end;
|
|
|
|
begin
|
|
|
|
end.
|