more moreatatime fixes

This commit is contained in:
Tomas Lindquist Olsen
2008-12-09 18:45:25 +01:00
parent 827113a0b2
commit 637c59a422
2 changed files with 3 additions and 0 deletions

View File

@@ -1059,6 +1059,7 @@ DValue* DtoCastClass(DValue* val, Type* _to)
Logger::println("static down cast");
// get the from class
ClassDeclaration* cd = fc->sym->isClassDeclaration();
DtoResolveClass(cd); // add this
IrStruct* irstruct = cd->ir.irStruct;
// find interface impl
IrStruct::InterfaceMapIter iriter = irstruct->interfaceMap.find(it);

View File

@@ -303,6 +303,8 @@ LLValue* DtoIndexStruct(LLValue* src, StructDeclaration* sd, VarDeclaration* vd)
Logger::println("indexing struct field %s:", vd->toPrettyChars());
LOG_SCOPE;
DtoResolveStruct(sd);
// vd must be a field
IrField* field = vd->ir.irField;
assert(field);