Fixed #218 by disabling the problematic optimization.

This commit is contained in:
Tomas Lindquist Olsen
2009-03-03 04:41:11 +01:00
parent 5dbe3ee8e2
commit 6778f06dfe

View File

@@ -46,7 +46,7 @@ Expression *fromConstInitializer(Expression *e1)
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;