mirror of https://github.com/swig/swig
* [Go] Fix argument names in inherited functions #795 This commit fixes a wrong argument name replacement in the inherited functions as well as a memory leak. * Add testcase for #795 * Move variable_replacement testcase into common * Move variable_replacement testcase into common
This commit is contained in:
parent
457ea5d209
commit
bac85d5b1a
|
@ -520,6 +520,7 @@ CPP_TEST_CASES += \
|
|||
valuewrapper_opaque \
|
||||
varargs \
|
||||
varargs_overload \
|
||||
variable_replacement \
|
||||
virtual_destructor \
|
||||
virtual_poly \
|
||||
virtual_vs_nonvirtual_base \
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
%module variable_replacement
|
||||
|
||||
%inline %{
|
||||
|
||||
class A {
|
||||
public:
|
||||
int a(int a1, int a2, int a3, int a4, int a5, int a6, int a7, int a8, int a9, int a10, int a11, int a12)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
class B : public A {
|
||||
};
|
||||
|
||||
%}
|
|
@ -2445,7 +2445,8 @@ private:
|
|||
}
|
||||
|
||||
String *code = Copy(Getattr(n, "wrap:action"));
|
||||
Replaceall(code, Getattr(parms, "lname"), current);
|
||||
Replace(code, Getattr(parms, "lname"), current, DOH_REPLACE_ANY | DOH_REPLACE_ID);
|
||||
Delete(current);
|
||||
Printv(actioncode, code, "\n", NULL);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue