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


Don <clugd...@yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


--- Comment #6 from Don <clugd...@yahoo.com.au> 2011-02-16 23:40:07 PST ---
I think my initial patch was basically correct. Overload sets are not equal to
other Objects.

----
int Dsymbol::equals(Object *o)
{   Dsymbol *s;

    if (this == o)
        return TRUE;
    s = (Dsymbol *)(o);
-    if (s && ident->equals(s->ident))
+    // Overload sets don't have an ident
+    if (s && ident && s->ident && ident->equals(s->ident))
        return TRUE;
    return FALSE;
}

The interesting thing, which I hadn't realized before, is that a template alias
parameter can be an overload set.
The question this raises is, are there other places in the code where it's
assumed that every DSymbol has an ident?

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

Reply via email to