Mercurial > projects > ldc
diff dmd/declaration.c @ 1358:78038e540342
Fix overload resolution issue in dmd bug 313/314 fix.
author | Christian Kamm <kamm incasoftware de> |
---|---|
date | Sat, 16 May 2009 12:17:33 +0200 |
parents | 0c03ba6f7c24 |
children | 194852badf8c |
line wrap: on
line diff
--- a/dmd/declaration.c Fri May 15 17:17:20 2009 +0200 +++ b/dmd/declaration.c Sat May 16 12:17:33 2009 +0200 @@ -369,6 +369,7 @@ #endif this->overnext = NULL; this->inSemantic = 0; + this->importprot = PROTundefined; assert(type); } @@ -501,15 +502,16 @@ FuncDeclaration *f = s->toAlias()->isFuncDeclaration(); if (f) { + FuncAliasDeclaration *fa = new FuncAliasDeclaration(f); + fa->importprot = importprot; if (overnext) { - FuncAliasDeclaration *fa = new FuncAliasDeclaration(f); if (!fa->overloadInsert(overnext)) ScopeDsymbol::multiplyDefined(0, f, overnext); overnext = NULL; - s = fa; - s->parent = sc->parent; } + s = fa; + s->parent = sc->parent; } if (overnext) ScopeDsymbol::multiplyDefined(0, s, overnext);