This commit is contained in:
Christian Kamm
2009-05-16 14:22:23 +02:00
2 changed files with 7 additions and 4 deletions

View File

@@ -502,16 +502,16 @@ void AliasDeclaration::semantic(Scope *sc)
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);

View File

@@ -1560,6 +1560,9 @@ int overloadApply(Module* from, FuncDeclaration *fstart,
break;
if (next == fstart)
break;
if (a->importprot == PROTprivate && a->getModule() != from)
if (FuncDeclaration* fd = next->isFuncDeclaration())
next = fd->overnext;
}
else
{