mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-12 10:53:14 +01:00
Make struct literals work with typedefs.
Fixes run/s/struct_initialization_13_A and run/t/typedef_20_A
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user