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


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

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


--- Comment #1 from Don <clugd...@yahoo.com.au> 2009-11-17 23:55:05 PST ---
This doesn't segfault in D2 because in expression.c, VarExp::semantic(),
line 4152, the initializer part is commented out.

    VarDeclaration *v = var->isVarDeclaration();
    if (v)
    {
+#if 0
    if ((v->isConst() || v->isInvariant()) &&
        type->toBasetype()->ty != Tsarray && v->init)
    {
        ExpInitializer *ei = v->init->isExpInitializer();
        if (ei)
        {
        //ei->exp->implicitCastTo(sc, type)->print();
        return ei->exp->implicitCastTo(sc, type);
        }
    }
+#endif
    v->checkNestedReference(sc, loc);
#if DMDV2

Doing the same thing in D1 fixes this bug, and the DMD test suite still passes.
However I'm not sure why the code above is unnecessary.

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

Reply via email to