Hi
WHile debugging why my selectiongrabbers arent shown, I ran into the folowing problem. When running the following example, it dumps when LocalFunc is called through the THE_FUNC constant. It seems that the parent function param insn't reffered correctly.
Marc
--------------------------------------------------------
program FuncConst;
{$mode objfpc}
type
PInteger = ^Integer;
function TestFunc(P: PInteger): Boolean;
type
TMyFunc = function: Boolean;
function LocalFunc: Boolean;
begin
Result := (P^ 0);
end;
const
THE_FUNC: TMyFunc = @LocalFunc;
begin
// Works OK
Result := LocalFunc;
// Dumps
Result := THE_FUNC();
end;
var
X: Integer;
begin
TestFunc(@X);
end.