comparison dmd/interpret/Util.d @ 79:43073c7c7769

updated to 2.035 also implemented a few missing functions still crashes in Import.importAll though
author Trass3r
date Mon, 30 Aug 2010 03:57:51 +0200
parents 7e0d548de9e6
children be2ab491772e
comparison
equal deleted inserted replaced
78:b98fa8a4bf04 79:43073c7c7769
180 { 180 {
181 Expressions structelems = new Expressions(); 181 Expressions structelems = new Expressions();
182 structelems.setDim(sym.fields.dim); 182 structelems.setDim(sym.fields.dim);
183 for (size_t j = 0; j < structelems.dim; j++) 183 for (size_t j = 0; j < structelems.dim; j++)
184 { 184 {
185 structelems.data[j] = cast(void*)(cast(VarDeclaration)(sym.fields.data[j])).type.defaultInit(Loc(0)); 185 structelems.data[j] = cast(void*)(cast(VarDeclaration)(sym.fields[j])).type.defaultInit(Loc(0));
186 } 186 }
187 StructLiteralExp structinit = new StructLiteralExp(loc, sym, structelems); 187 StructLiteralExp structinit = new StructLiteralExp(loc, sym, structelems);
188 // Why doesn't the StructLiteralExp constructor do this, when 188 // Why doesn't the StructLiteralExp constructor do this, when
189 // sym.type != null ? 189 // sym.type != null ?
190 structinit.type = sym.type; 190 structinit.type = sym.type;