Fix templated constructors regression
Templated constructors were incorrectly ignored because SWIG thought they were methods without a return type. Regression introduced in swig-3.0.0 Closes #245.
This commit is contained in:
parent
9cbdf69fdc
commit
ae555c2339
5 changed files with 81 additions and 1 deletions
|
|
@ -2694,7 +2694,8 @@ int Language::constructorDeclaration(Node *n) {
|
|||
String *scope = Swig_scopename_check(ClassName) ? Swig_scopename_prefix(ClassName) : 0;
|
||||
String *actual_name = scope ? NewStringf("%s::%s", scope, name) : NewString(name);
|
||||
Delete(scope);
|
||||
if (!Equal(actual_name, expected_name) && !SwigType_istemplate(expected_name)) {
|
||||
if (!Equal(actual_name, expected_name) && !SwigType_istemplate(expected_name) && !SwigType_istemplate(actual_name)) {
|
||||
// Checking templates is skipped but they ought to be checked... they are just somewhat more tricky to check correctly
|
||||
bool illegal_name = true;
|
||||
if (Extend) {
|
||||
// Check for typedef names used as a constructor name in %extend. This is deprecated except for anonymous
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue