[Issue 5595] Compiler crash on heavy std.algorithm use

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Feb 16 23:42:42 PST 2011


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


Don <clugdbug at yahoo.com.au> changed:

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


--- Comment #6 from Don <clugdbug at 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: -------


More information about the Digitalmars-d-bugs mailing list