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

@@ -53,6 +53,18 @@ void DtoResolveClass(ClassDeclaration* cd)
IrStruct* irstruct = new IrStruct(cd);
cd->ir.irStruct = irstruct;
// make sure all fields really get their ir field
ArrayIter<VarDeclaration> it(cd->fields);
for (; !it.done(); it.next())
{
VarDeclaration* vd = it.get();
if (vd->ir.irField == NULL) {
new IrField(vd);
} else {
IF_LOG Logger::println("class field already exists!!!");
}
}
bool needs_def = mustDefineSymbol(cd);
// emit the ClassZ symbol