mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-02-07 15:33:14 +01:00
When newing a struct, make sure the initializer is available.
This commit is contained in:
@@ -1512,6 +1512,7 @@ DValue* NewExp::toElem(IRState* p)
|
||||
}
|
||||
else {
|
||||
assert(ts->sym);
|
||||
DtoForceConstInitDsymbol(ts->sym);
|
||||
DtoAggrCopy(mem,ts->sym->ir.irStruct->init);
|
||||
}
|
||||
return new DImValue(type, mem);
|
||||
|
||||
Reference in New Issue
Block a user