> On Feb 10, 2021, at 11:09 AM, Ryan Joseph <generic...@gmail.com> wrote:
> 
> type
> TSomeTrait = trait
>   public
>     parent: TObject;
>     procedure DoThis;
> end; 
> 
> procedure TSomeTrait .DoThis;
> begin
>    // ??? here is our issue. Is this good enough to call the 
> TBaseClass.DoThis?
>    TBaseClass(parent).DoThis;
> end;

Thinking about this more I don't think there's even a reason for it since 
Object Pascal doesn't let you do stuff like this anyways. If you want to call 
the super class you need to use "inherited" from within the class body.  The 
example I posted only works if there is no virtual/override involved.

Regards,
        Ryan Joseph

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

Reply via email to