# HG changeset patch # User Christian Kamm # Date 1242476529 -7200 # Node ID 194852badf8c27b5ca37a7991de938cf4f009f86 # Parent 78038e540342742b75366e38d983e1c13a6e4f68 Don't always expand aliases to FuncDecls to FuncAliasDecls - breaks for single functions. diff -r 78038e540342 -r 194852badf8c dmd/declaration.c --- a/dmd/declaration.c Sat May 16 12:17:33 2009 +0200 +++ b/dmd/declaration.c Sat May 16 14:22:09 2009 +0200 @@ -502,16 +502,16 @@ FuncDeclaration *f = s->toAlias()->isFuncDeclaration(); if (f) { - FuncAliasDeclaration *fa = new FuncAliasDeclaration(f); - fa->importprot = importprot; if (overnext) { + FuncAliasDeclaration *fa = new FuncAliasDeclaration(f); + fa->importprot = importprot; 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); diff -r 78038e540342 -r 194852badf8c dmd/func.c --- a/dmd/func.c Sat May 16 12:17:33 2009 +0200 +++ b/dmd/func.c Sat May 16 14:22:09 2009 +0200 @@ -1560,6 +1560,9 @@ break; if (next == fstart) break; + if (a->importprot == PROTprivate && a->getModule() != from) + if (FuncDeclaration* fd = next->isFuncDeclaration()) + next = fd->overnext; } else {