changeset 487:d7b2e8777e2b

Make struct literals work with typedefs. Fixes run/s/struct_initialization_13_A and run/t/typedef_20_A
author Christian Kamm <kamm incasoftware de>
date Sun, 10 Aug 2008 10:40:26 +0200
parents a34078905d01
children 993b217af574
files gen/toir.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/gen/toir.cpp	Sun Aug 10 08:37:38 2008 +0200
+++ b/gen/toir.cpp	Sun Aug 10 10:40:26 2008 +0200
@@ -2172,7 +2172,7 @@
 
     // default init the struct to take care of padding
     // and unspecified members
-    TypeStruct* ts = (TypeStruct*)type;
+    TypeStruct* ts = (TypeStruct*)type->toBasetype();
     assert(ts->sym);
     DtoForceConstInitDsymbol(ts->sym);
     assert(ts->sym->ir.irStruct->init);