Fix symbol table bug with combinations of using directives and using declarations

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13190 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-06-25 06:36:29 +00:00
commit 1ce0058256
5 changed files with 146 additions and 0 deletions

View file

@ -1053,6 +1053,25 @@ static Node *symbol_lookup_qualified(const_String_or_char_ptr name, Symtab *symt
Node *pn = Getattr(symtab, "parentNode");
if (pn)
n = symbol_lookup_qualified(name, pn, prefix, local, checkfunc);
/* Check inherited scopes */
if (!n) {
List *inherit = Getattr(symtab, "inherit");
if (inherit) {
int i, len;
len = Len(inherit);
for (i = 0; i < len; i++) {
Node *prefix_node = symbol_lookup(prefix, Getitem(inherit, i), checkfunc);
if (prefix_node) {
Node *prefix_symtab = Getattr(prefix_node, "symtab");
if (prefix_symtab) {
n = symbol_lookup(name, prefix_symtab, checkfunc);
break;
}
}
}
}
}
} else {
n = 0;
}