mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2026-01-05 03:10:31 +01:00
27 lines
331 B
ObjectPascal
27 lines
331 B
ObjectPascal
{ %FAIL }
|
|
|
|
program tanonfunc46;
|
|
|
|
{$mode objfpc}
|
|
{$modeswitch anonymousfunctions}
|
|
{$modeswitch functionreferences}
|
|
|
|
{ var parameters can't be captured }
|
|
|
|
type
|
|
TProc = reference to procedure;
|
|
|
|
procedure Test(var aArg: LongInt);
|
|
var
|
|
p: TProc;
|
|
begin
|
|
p := procedure
|
|
begin
|
|
aArg := 42;
|
|
end;
|
|
end;
|
|
|
|
begin
|
|
|
|
end.
|