[fpc-pascal] Strange error message?
John Coppens
john at jcoppens.com
Fri Jul 7 19:40:35 CEST 2006
Hi...
I was trying to compile some old TP code and got a strange error message:
program test_reg;
type
ShTableLine= procedure(n: integer);
procedure DummyShLine(Nr: integer);
begin
end; {DummyShLine}
procedure UseIt;
const
PrevProc: ShTableLine = DummyShLine;
begin
end;
begin
end.
This gives me the following message (referring to the 'const' line in
UseIt):
Error: Incompatible types: got "DummyShLine(SmallInt)" expected
"<procedure variable type of procedure(SmallInt);Register>"
I didn't declare the original as being 'register', why should it expect
that later? And how to solve the problem?
Thanks!
John
PS: FPC is version 2.0.2
More information about the fpc-pascal
mailing list