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