Weakened constructor name check to work around nested-class hack reported by

Gustavo Niemeyer.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5565 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2003-12-14 15:42:32 +00:00
commit b29f77f801

View file

@ -1826,7 +1826,7 @@ int Language::constructorDeclaration(Node *n) {
}
}
} else {
if (name && (Cmp(name,ClassName)) && !(Getattr(n,"template"))) {
if (name && (Cmp(Swig_scopename_last(name),Swig_scopename_last(ClassName))) && !(Getattr(n,"template"))) {
Printf(stdout,"name = '%s', ClassName='%s'\n", name, ClassName);
Swig_warning(WARN_LANG_RETURN_TYPE, input_file,line_number,"Function %s must have a return type.\n",
name);