> On Feb 15, 2022, at 5:15 PM, Sven Barth <pascaldra...@googlemail.com> wrote:
> 
> It contains a capture object that backs the method. 
> If nothing is captured and the right hand side is a direct function or method 
> pointer then the compiler could in principle create something that is 
> essentially static to avoid allocations, but that would be a future 
> optimization. 
> 

So if we do this there is nothing being captured right? In that case we get an 
interface which can call a function pointer? Does the interface then know about 
"of object" and "is nested" types at all or does it use a totally different 
mechanism to call those?

================

type
 TMyAction = reference to procedure;

procedure MyAction;
 begin
 end;

procedure Test;
 begin
   DoThis(@MyAction);
 end;

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