Mercurial > projects > ldc
comparison 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 |
comparison
equal
deleted
inserted
replaced
1357:48747003a5de | 1358:78038e540342 |
---|---|
683 //printf("%s->ScopeDsymbol::search(ident='%s', flags=x%x)\n", toChars(), ident->toChars(), flags); | 683 //printf("%s->ScopeDsymbol::search(ident='%s', flags=x%x)\n", toChars(), ident->toChars(), flags); |
684 | 684 |
685 // Look in symbols declared in this module | 685 // Look in symbols declared in this module |
686 Dsymbol *s = symtab ? symtab->lookup(ident) : NULL; | 686 Dsymbol *s = symtab ? symtab->lookup(ident) : NULL; |
687 | 687 |
688 // hide private nonlocal symbols | 688 // hide the aliases generated by selective or renamed private imports |
689 if (flags & 1 && s && s->prot() == PROTprivate) | 689 if (s && flags & 1) |
690 s = NULL; | 690 if (AliasDeclaration* ad = s->isAliasDeclaration()) |
691 // may be a private alias to a function that is overloaded. these | |
692 // are sorted out during overload resolution, accept them here | |
693 if (ad->importprot == PROTprivate && !ad->aliassym->isFuncAliasDeclaration()) | |
694 s = NULL; | |
691 | 695 |
692 if (s) | 696 if (s) |
693 { | 697 { |
694 //printf("\ts = '%s.%s'\n",toChars(),s->toChars()); | 698 //printf("\ts = '%s.%s'\n",toChars(),s->toChars()); |
695 } | 699 } |