> On Sep 3, 2018, at 9:17 PM, Martin <f...@mfriebe.de> wrote:
> 
> You.f.Free;
> will always work, it is not ambiguous.
> 
> You.Free;
> depends on no method Free being declared on the class of You, or any of its 
> base classes, or any other default class (if more than one is allowed) that 
> would be searched at higher priority.

sorry I just wanted to add, in the case of You.Free where there is an naming 
conflicting in super classes (Free in TObject of 3 classes) the rule is:

1) *always* use the base classes implementation regardless of order.
2) if you want an implementation other than the base class you must explicitly 
call on that field.

That should be easy to follow I think. Even if that’s not complete or correct 
we can assign very strict rules which force the programmer into explicit calls 
when naming conflicts exist.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to