mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-11 18:33:14 +01:00
Fixed #218 by disabling the problematic optimization.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user