From 9dc387aa9145d4541f6f473724ca5dd0abaa9639 Mon Sep 17 00:00:00 2001 From: David Nadlinger Date: Fri, 14 Jun 2013 16:42:34 +0200 Subject: [PATCH] Do not invoke postblit twice on struct literal creation. The frontend seems to explicitly insert __cpctor now. Fixes DMD testcase 'sdtor'. --- gen/toir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/toir.cpp b/gen/toir.cpp index a4d81501..2ac4cbff 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -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());