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
|
|
@ -412,6 +412,12 @@ void Swig_symbol_inherit(Symtab *s) {
|
|||
Setattr(current_symtab,k_inherit, inherit);
|
||||
Delete(inherit);
|
||||
}
|
||||
|
||||
if (s == current_symtab) {
|
||||
Swig_warning(WARN_PARSE_REC_INHERITANCE, Getfile(s), Getline(s),
|
||||
"Recursive scope inheritance of '%s'.\n", HashGetAttr(s,k_name));
|
||||
return;
|
||||
}
|
||||
assert(s != current_symtab);
|
||||
ilen = Len(inherit);
|
||||
for (i = 0; i < ilen; i++) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue