[Issue 4838] Cannot declare a delegate variable for const member functions

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 8 07:12:22 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4838



--- Comment #7 from Don <clugdbug at yahoo.com.au> 2010-09-08 07:11:58 PDT ---
General comment: You have to be careful with .stringof, it's not yet reliable
(a difference in .stringof doesn't necessarily mean a difference in type). But
.mangleof never lies. The conclusion in this case is still correct, though.

A workaround for the original problem is to use auto (or typeof).

   pragma( msg, (&a.foo).mangleof );
   auto dg = &a.foo;                  // this works
   const void delegate() dg2 = &a.foo;
   pragma(msg, dg.mangleof);
   pragma(msg, dg2.mangleof);
-------
DxFZv
DxFZv
xDFZv

What I said still applies -- it's a parsing problem.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list