This program hangs during compiling. Does this happen to you too?

===================================================

  Free Pascal Compiler version 3.3.1 [2023/03/03] for aarch64

{$mode objfpc}
{$modeswitch anonymousfunctions}
{$modeswitch functionreferences}

program test;

type
  TProc = reference to procedure;

function TestNested: TProc;

  procedure NestedProc2;
  begin
  end;

begin
  result := procedure
  var
    p: TProc;
  begin
    p := @NestedProc2;
  end;
end;

var
  p: TProc;
begin
  p := TestNested;
  p();
end.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to