[Issue 4238] Segfault(statement.c): with(typeof(int))
    d-bugmail at puremagic.com 
    d-bugmail at puremagic.com
       
    Wed May 26 13:20:16 PDT 2010
    
    
  
http://d.puremagic.com/issues/show_bug.cgi?id=4238
--- Comment #1 from Don <clugdbug at yahoo.com.au> 2010-05-26 13:20:16 PDT ---
Darn it, waited to long before hitting submit, and another bug snuck in before
this one -- test case should be changed to bug4238(). <g>.
Anyway, if you add one line to the patch, it fixes bug 1413. I was actually
trying to generate a case where 1413 matters, but failed. But I found this case
instead.
PATCH (D2 svn 502):
// WithStatement::semantic. line 3639: segfaults because toDsymbol(sc)
// returns null.
{   TypeExp *es = (TypeExp *)exp;
-        sym = es->type->toDsymbol(sc)->isScopeDsymbol();
+        Dsymbol *dsym = es->type->toDsymbol(sc);
+        sym = dsym ? dsym->isScopeDsymbol() : NULL;
        if (!sym)
        {   error("%s has no members", es->toChars());
+           if (body)
            body = body->semantic(sc);
            return this;
        }
    }
-- 
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