[fpc-devel] misleading error msg in fpc 2.2.0

Giuliano Colla giuliano.colla at fastwebnet.it
Mon Feb 4 19:37:19 CET 2008

While porting Delphi CLX library to fpc/Lazarus, I mixed up things, and 
I tried to override an ancestor method which is static in CLX, because I 
remembered it to be virtual in Lazarus.

So far so good, but it took me some time to sort out the problem, 
because the compiler error message was "There's no ancestor method to be 
overridden", instead of "A static method can't be overridden" (as Delphi 
tells in such cases).
So I started looking for typos, wrong inheritance, etc, instead of 
looking for the real bug. Has this error message been fixed in 2.3.1 or 
it's still there?

Clear and unambiguous error messages are among the advantages of Pascal 
over C++. It would be a pity to leave there a misleading error message.


Giuliano Colla

Whenever people agree with me, I always feel I must be wrong (O. Wilde)

More information about the fpc-devel mailing list