Make struct literals work with typedefs.

Fixes run/s/struct_initialization_13_A and run/t/typedef_20_A
This commit is contained in:
Christian Kamm
2008-08-10 10:40:26 +02:00
parent 9d7f16b967
commit 646679fd44

View File

@@ -2172,7 +2172,7 @@ DValue* StructLiteralExp::toElem(IRState* p)
// default init the struct to take care of padding
// and unspecified members
TypeStruct* ts = (TypeStruct*)type;
TypeStruct* ts = (TypeStruct*)type->toBasetype();
assert(ts->sym);
DtoForceConstInitDsymbol(ts->sym);
assert(ts->sym->ir.irStruct->init);