[Issue 2672] Delegate .funcptr returns wrong type.
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Mar 2 03:43:32 PST 2009
http://d.puremagic.com/issues/show_bug.cgi?id=2672
------- Comment #2 from kamm-removethis at incasoftware.de 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.
--
More information about the Digitalmars-d-bugs
mailing list