Fixed an assertion in DtoType()

This commit is contained in:
Alexey Prokhin
2011-07-19 19:58:38 +04:00
parent edd1ed5b09
commit 4cc10019ee

View File

@@ -306,6 +306,11 @@ void DtoResolveFunction(FuncDeclaration* fdecl)
if (fdecl->ir.resolved) return;
fdecl->ir.resolved = true;
// If errors occurred compiling it, such as bugzilla 6118
Type *type = fdecl->type;
if (type && type->ty == Tfunction && ((TypeFunction *)type)->next->ty == Terror)
return;
//printf("resolve function: %s\n", fdecl->toPrettyChars());
if (fdecl->parent)