From 637c59a42294a4e788dc9c1e12d135f30580f1c2 Mon Sep 17 00:00:00 2001 From: Tomas Lindquist Olsen Date: Tue, 9 Dec 2008 18:45:25 +0100 Subject: [PATCH] more moreatatime fixes --- gen/classes.cpp | 1 + gen/structs.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/gen/classes.cpp b/gen/classes.cpp index f5ab7320..f9ae157c 100644 --- a/gen/classes.cpp +++ b/gen/classes.cpp @@ -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); diff --git a/gen/structs.cpp b/gen/structs.cpp index c5202959..b0ca9049 100644 --- a/gen/structs.cpp +++ b/gen/structs.cpp @@ -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);