[Issue 4860] Taking delegates to a member function broken if method is also aliased in from a base class

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 19 22:18:03 PST 2010


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



--- Comment #7 from Don <clugdbug at yahoo.com.au> 2010-11-19 22:16:42 PST ---
That patch was a bit too early in the function. Should be e2ir.c, line 3308.
Still in DelegateExp::toElem().

        {
            // Get pointer to function out of virtual table
            unsigned vindex;

            assert(ethis);
            ep = el_same(&ethis);
            ep = el_una(OPind, TYnptr, ep);
            vindex = func->vtblIndex;
+    if (vindex < 0)
+        error("Internal compiler error: malformed delegate. See Bugzilla
4860");

            // Build *(ep + vindex * 4)
            ep = el_bin(OPadd,TYnptr,ep,el_long(TYsize_t, vindex * 4));
            ep = el_una(OPind,TYnptr,ep);
        }

-- 
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