[fpc-devel] Assigning to inherited property calls setter of the child class

Alexander Klenin klenin at gmail.com
Fri May 1 19:04:16 CEST 2009


On Sat, May 2, 2009 at 03:16, Mattias Gaertner
<nc-gaertnma at netcologne.de> wrote:
>> Is there a Mercurial mirror of FPC docs?
>
> Don't know.
> Will you create the bug report?

http://bugs.freepascal.org/view.php?id=13632

Is the mirror would be available, I'd create a patch too.

>> >> Alternative solution would be to issue a warning if
>> >> TInherited.SetP contains "inherited P := V" and SetP is virtual.
>> >
>> > -1
>>
>> Why? Your example does not cover this.
>
> Because properties have nothing to do with methods.

Of course, SetP should be also write accessor for P property for the warning
to occur.

> It would be nice it FPC can give a warning/hint if 'inherited' is used
> and there is no such member in the current class. Because in this case
> the 'inherited' is useless and the programmer probably intended
> something other. This warning/hint can be given for all members -
> properties, methods and variables.

+1

-- 
Alexander S. Klenin



More information about the fpc-devel mailing list