mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-27 10:03:13 +01:00
Do not invoke postblit twice on struct literal creation.
The frontend seems to explicitly insert __cpctor now. Fixes DMD testcase 'sdtor'.
This commit is contained in:
@@ -2912,7 +2912,7 @@ DValue* StructLiteralExp::toElem(IRState* p)
|
||||
DVarValue field(vd->type, vd, DtoIndexStruct(mem, sd, vd));
|
||||
|
||||
// store the initializer there
|
||||
DtoAssign(loc, &field, val, TOKconstruct);
|
||||
DtoAssign(loc, &field, val, TOKconstruct, true);
|
||||
|
||||
if (expr)
|
||||
callPostblit(loc, expr, field.getLVal());
|
||||
|
||||
Reference in New Issue
Block a user