comparison dmd2/dsymbol.c @ 847:356e65836fb5

Merged DMD 2.021 frontend. Removed generated files from dmd/dmd2 dirs.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Sat, 13 Dec 2008 16:14:37 +0100
parents f04dde6e882c
children 5fa3e0ea06e9
comparison
equal deleted inserted replaced
846:bc982f1ad106 847:356e65836fb5
664 } 664 }
665 665
666 Dsymbol *ScopeDsymbol::search(Loc loc, Identifier *ident, int flags) 666 Dsymbol *ScopeDsymbol::search(Loc loc, Identifier *ident, int flags)
667 { 667 {
668 //printf("%s->ScopeDsymbol::search(ident='%s', flags=x%x)\n", toChars(), ident->toChars(), flags); 668 //printf("%s->ScopeDsymbol::search(ident='%s', flags=x%x)\n", toChars(), ident->toChars(), flags);
669 //if (strcmp(ident->toChars(),"c") == 0) *(char*)0=0;
669 670
670 // Look in symbols declared in this module 671 // Look in symbols declared in this module
671 Dsymbol *s = symtab ? symtab->lookup(ident) : NULL; 672 Dsymbol *s = symtab ? symtab->lookup(ident) : NULL;
672 673
673 // hide private nonlocal symbols 674 // hide private nonlocal symbols
787 { 788 {
788 for (int i = 0; i < imports->dim; i++) 789 for (int i = 0; i < imports->dim; i++)
789 { ScopeDsymbol *ss; 790 { ScopeDsymbol *ss;
790 791
791 ss = (ScopeDsymbol *) imports->data[i]; 792 ss = (ScopeDsymbol *) imports->data[i];
792 if (ss == s) 793 if (ss == s) // if already imported
793 { 794 {
794 if (protection > prots[i]) 795 if (protection > prots[i])
795 prots[i] = protection; // upgrade access 796 prots[i] = protection; // upgrade access
796 return; 797 return;
797 } 798 }