mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-07-22 22:56:25 +02:00
27 lines
323 B
ObjectPascal
27 lines
323 B
ObjectPascal
program tanonfunc21;
|
|
|
|
{$mode objfpc}
|
|
{$modeswitch anonymousfunctions}
|
|
{$modeswitch functionreferences}
|
|
|
|
{ test passing references across unit boundaries }
|
|
|
|
uses uanonfunc21;
|
|
|
|
procedure foo;
|
|
var
|
|
i: Integer;
|
|
begin
|
|
bar(procedure
|
|
begin
|
|
i := 123;
|
|
end);
|
|
if i <> 123 then
|
|
halt(1);
|
|
end;
|
|
|
|
begin
|
|
foo;
|
|
end.
|
|
|