[Issue 5242] self referencing template constraint crashes compiler

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Nov 19 14:43:58 PST 2010


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


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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |ice-on-invalid-code, patch
                 CC|                            |clugdbug at yahoo.com.au


--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-11-19 14:42:41 PST ---
PATCH: template.c, line 2509

void deduceBaseClassParameters(BaseClass *b,
    Scope *sc, Type *tparam, TemplateParameters *parameters, Objects *dedtypes,
    Objects *best, int &numBaseClassMatches)
{
-    TemplateInstance *parti = b->base->parent->isTemplateInstance();
+    TemplateInstance *parti = b->base ? b->base->parent->isTemplateInstance()
: NULL;
    if (parti)
    {
        // Make a temporary copy of dedtypes so we don't destroy it
        Objects *tmpdedtypes = new Objects();

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