From 4cc10019eef759c6bfb8bfe0fd5b49e230347507 Mon Sep 17 00:00:00 2001 From: Alexey Prokhin Date: Tue, 19 Jul 2011 19:58:38 +0400 Subject: [PATCH] Fixed an assertion in DtoType() --- gen/functions.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gen/functions.cpp b/gen/functions.cpp index 94d63e22..668b540b 100644 --- a/gen/functions.cpp +++ b/gen/functions.cpp @@ -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)