[Lazarus] inherited in autocode

Martok listbox at martoks-place.de
Sun Jan 13 17:21:33 CET 2019


Am 13.01.2019 um 01:36 schrieb Martin Frb via lazarus:
> Well, I was told it was the same 
> https://bugs.freepascal.org/view.php?id=33862

Depends on how one reads the Emba Developer's comment.

""" In such case, a call to an inherited method may occur if it exists or not if
it doesn't. Such a reference is limited to methods with the same name and
parameter list *in the parent class* """ (emph. mine)

I would read that so that it only looks in *the* parent class, not "any ancestor
class". If it finds nothing, it indeed generates no code and no error.

As observed, if it finds a matching name with wrong parameter list, an error is
raised.


Fun Fact: if a matching name and parameter list exists and is virtual abstract,
no code will be generated either. This is probably to protect from calls to
virtual methods?

-- 
Regards,
Martok




More information about the lazarus mailing list