Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2023-09

Closure hangs compiler

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Hairy Pixels

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

Reply by email

Michael Van Canneyt
to Hairy Pixels
Hairy Pixels wrote
This program hangs during compiling. Does this happen to you too?

I can confirm. Please create a bugreport.

Michael.

Show quoted text 44 lines
=================================================== 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 - https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply by email