Skip to content

Commit

Permalink
bugzilla 4011 Incorrect function overloading using mixins
Browse files Browse the repository at this point in the history
  • Loading branch information
Walter Bright committed Mar 26, 2010
1 parent a19ba5a commit b227b61
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/declaration.c
Expand Up @@ -560,6 +560,18 @@ int AliasDeclaration::overloadInsert(Dsymbol *s)
*/

//printf("AliasDeclaration::overloadInsert('%s')\n", s->toChars());
if (aliassym) // see test/test56.d
{
Dsymbol *a = aliassym->toAlias();
FuncDeclaration *f = a->isFuncDeclaration();
if (f) // BUG: what if it's a template?
{
FuncAliasDeclaration *fa = new FuncAliasDeclaration(f);
aliassym = fa;
return fa->overloadInsert(s);
}
}

if (overnext == NULL)
{
if (s == this)
Expand Down

0 comments on commit b227b61

Please sign in to comment.