diff gen/toir.cpp @ 671:96e425004a68

When newing a struct, make sure the initializer is available.
author Christian Kamm <kamm incasoftware de>
date Wed, 08 Oct 2008 20:41:43 +0200
parents 9c48213cfd96
children 518b8cc84369
line wrap: on
line diff
--- a/gen/toir.cpp	Wed Oct 08 20:28:59 2008 +0200
+++ b/gen/toir.cpp	Wed Oct 08 20:41:43 2008 +0200
@@ -1512,6 +1512,7 @@
         }
         else {
             assert(ts->sym);
+            DtoForceConstInitDsymbol(ts->sym);
             DtoAggrCopy(mem,ts->sym->ir.irStruct->init);
         }
         return new DImValue(type, mem);