Fixed deal breaker bug for more-at-once compilation when any module contained aggregates. Fixes ticket #272 .

This commit is contained in:
Tomas Lindquist Olsen
2009-05-07 02:10:29 +02:00
parent 7f07cf02ad
commit ca4f588c08
8 changed files with 54 additions and 40 deletions

View File

@@ -44,6 +44,18 @@ void DtoResolveStruct(StructDeclaration* sd)
IrStruct* irstruct = new IrStruct(sd);
sd->ir.irStruct = irstruct;
// make sure all fields really get their ir field
ArrayIter<VarDeclaration> it(sd->fields);
for (; !it.done(); it.next())
{
VarDeclaration* vd = it.get();
if (vd->ir.irField == NULL) {
new IrField(vd);
} else {
IF_LOG Logger::println("struct field already exists!!!");
}
}
// perform definition
bool needs_def = mustDefineSymbol(sd);
if (needs_def)