> On Feb 15, 2022, at 8:32 PM, Sven Barth via fpc-pascal
> <[email protected]> wrote:
>
> A function reference is simply an interface of which the Invoke method can be
> called on the instance instead of manually doing "Foo.Invoke".
>
> The real "magic" is when the compiler generates the *implementation* of said
> interface. So in the end what can be assigned to a function reference depends
> on the compiler being able to generate suitable implementations.
So when you assign a global function to a function reference it has to generate
a new function body? I guess that makes sense on how it can "capture" these
different types of functions.
Regards,
Ryan Joseph
_______________________________________________
fpc-pascal maillist - [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal