Mercurial > projects > ldc
diff dmd/dsymbol.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 | dbe4af57b240 |
children | def7a1d494fd |
line wrap: on
line diff
--- a/dmd/dsymbol.c Fri May 15 17:17:20 2009 +0200 +++ b/dmd/dsymbol.c Sat May 16 12:17:33 2009 +0200 @@ -685,9 +685,13 @@ // Look in symbols declared in this module Dsymbol *s = symtab ? symtab->lookup(ident) : NULL; - // hide private nonlocal symbols - if (flags & 1 && s && s->prot() == PROTprivate) - s = NULL; + // hide the aliases generated by selective or renamed private imports + if (s && flags & 1) + if (AliasDeclaration* ad = s->isAliasDeclaration()) + // may be a private alias to a function that is overloaded. these + // are sorted out during overload resolution, accept them here + if (ad->importprot == PROTprivate && !ad->aliassym->isFuncAliasDeclaration()) + s = NULL; if (s) {