Skip to content

Commit

Permalink
do not write failed template instantiations or parts of these to the …
Browse files Browse the repository at this point in the history
…object file
  • Loading branch information
rainers committed Jan 10, 2014
1 parent 044717c commit 49fe571
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/template.c
Expand Up @@ -104,7 +104,7 @@ int isError(RootObject *o)
Dsymbol *s = isDsymbol(o);
if (s->errors)
return 1;
return 0;
return s && s->parent ? isError(s->parent) : 0;
}

/**************************************
Expand Down
2 changes: 1 addition & 1 deletion src/toobj.c
Expand Up @@ -1145,7 +1145,7 @@ void TemplateInstance::toObjFile(int multiobj)
#if LOG
printf("TemplateInstance::toObjFile('%s', this = %p)\n", toChars(), this);
#endif
if (!errors && members)
if (!isError(this) && members)
{
if (multiobj)
// Append to list of object files to be written later
Expand Down

0 comments on commit 49fe571

Please sign in to comment.