------- Comment #2 from  2009-03-02 05:43 
Not every delegate can be called as a function. Consider a delegate with the
signature 'Struct delegate(int)' whose parameters get passed as a1, hidden,
this. If you cast its funcptr to 'Struct function(int a1, void* fthis)' the
arguments will be passed as a1, fthis, hidden.

Delegates that don't use hidden can be represented as a function with the this
pointer as the last argument.

I'd argue that funcptr shouldn't have a function type at all.


Reply via email to