diff --git a/Source/Modules/lang.cxx b/Source/Modules/lang.cxx index 719b5fcf8..9f02c7077 100644 --- a/Source/Modules/lang.cxx +++ b/Source/Modules/lang.cxx @@ -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);