avoid assert when finding a recursive scope inheritance, emit a warning in the worst case, reported by Nitro
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8832 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e9877c5ca7
commit
cb80d44fa6
4 changed files with 24 additions and 3 deletions
|
|
@ -236,10 +236,16 @@ class TypePass : private Dispatcher {
|
|||
SwigType_inherit_scope(scopes);
|
||||
}
|
||||
/* Set up inheritance in the symbol table */
|
||||
Symtab *s = Swig_symbol_current();
|
||||
Symtab *st = Getattr(cls,"symtab");
|
||||
Symtab *bst = Getattr(bclass,"symtab");
|
||||
if (st == bst) {
|
||||
Swig_warning(WARN_PARSE_REC_INHERITANCE, Getfile(cls), Getline(cls),
|
||||
"Recursive scope inheritance of '%s'.\n", HashGetAttr(cls,k_name));
|
||||
continue;
|
||||
}
|
||||
Symtab *s = Swig_symbol_current();
|
||||
Swig_symbol_setscope(st);
|
||||
Swig_symbol_inherit(Getattr(bclass,"symtab"));
|
||||
Swig_symbol_inherit(bst);
|
||||
Swig_symbol_setscope(s);
|
||||
|
||||
/* Recursively hit base classes */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue