Permalink
Browse files

fix Issue 9008 - Another forward referencing bug

  • Loading branch information...
1 parent 21c27b3 commit cc91b4baa0761a8c4e1ba4fd7513a30f8bc9a3fe @WalterBright WalterBright committed Nov 13, 2012
Showing with 8 additions and 1 deletion.
  1. +8 −1 src/template.c
View
@@ -5751,8 +5751,15 @@ Identifier *TemplateInstance::genIdent(Objects *args)
Lsa:
buf.writeByte('S');
Declaration *d = sa->isDeclaration();
+ Lsa2:
if (d && (!d->type || !d->type->deco))
- { error("forward reference of %s", d->toChars());
+ {
+ FuncAliasDeclaration *fad = d->isFuncAliasDeclaration();
+ if (fad)
+ { d = fad->toAliasFunc();
+ goto Lsa2;
+ }
+ error("forward reference of %s %s", d->kind(), d->toChars());
continue;
}
#if 0

0 comments on commit cc91b4b

Please sign in to comment.