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





------- Comment #2 from to...@famolsen.dk  2009-03-02 21:46 -------
I fixed this in LDC by disabling the Initializer -> Expression optimization for
StructInitializerS:

--- a/dmd/optimize.c    Tue Mar 03 02:51:21 2009 +0100
+++ b/dmd/optimize.c    Tue Mar 03 04:38:49 2009 +0100
@@ -46,7 +46,7 @@
     if (e1->op == TOKvar)
     {  VarExp *ve = (VarExp *)e1;
        VarDeclaration *v = ve->var->isVarDeclaration();
-       if (v && v->isConst() && v->init)
+       if (v && v->isConst() && v->init && !v->init->isStructInitializer())
        {   Expression *ei = v->init->toExpression();
            if (ei && ei->type)
                e1 = ei;


-- 

Reply via email to