Function reference declared in unit gives internal error 2019022201
Declaring a function reference in a record from a unit gives internal compiler error 2019022201. Something is wrong with the PPU. This works if declared from a program.
Free Pascal Compiler version 3.3.1 [2022/05/27] for aarch64.
{$mode objfpc}
{$modeswitch functionreferences}
unit function_ref_error;
interface
type
TCallback = record
proc: reference to procedure;
end;
implementation
end.