From 94997611311ae37111f31ee6f9c363dc4bcb6691 Mon Sep 17 00:00:00 2001 From: Christian Kamm Date: Wed, 8 Oct 2008 20:41:43 +0200 Subject: [PATCH] When newing a struct, make sure the initializer is available. --- gen/toir.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/gen/toir.cpp b/gen/toir.cpp index e0209beb..d8386ed8 100644 --- a/gen/toir.cpp +++ b/gen/toir.cpp @@ -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);