mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 02:28:14 +02:00
37 lines
500 B
ObjectPascal
37 lines
500 B
ObjectPascal
{ %NORUN }
|
|
|
|
program tanonfunc32;
|
|
|
|
{$mode objfpc}
|
|
{$modeswitch anonymousfunctions}
|
|
{$modeswitch functionreferences}
|
|
|
|
{ Test that there's no internal error when REGVAR optimizations are enabled }
|
|
|
|
{$optimization regvar}
|
|
|
|
type
|
|
TProc = reference to procedure;
|
|
|
|
TObj = class
|
|
Str: string;
|
|
end;
|
|
|
|
procedure GlobalProc(AObj: TObj);
|
|
|
|
procedure NestedProc(AProc: TProc);
|
|
begin
|
|
AObj.Str := '';
|
|
end;
|
|
|
|
begin
|
|
NestedProc(
|
|
procedure
|
|
begin
|
|
AObj.Str := '';
|
|
end)
|
|
end;
|
|
|
|
begin
|
|
end.
|