Parameter name expansion fix for template functions.
Fix regression in 4.0.0 where a template function containing a parameter with the same name as the function name led to the parameter name used in the target language being incorrectly modified. Closes #1602
This commit is contained in:
parent
0d76eb3b56
commit
3cc4b21163
3 changed files with 34 additions and 11 deletions
|
|
@ -26,3 +26,16 @@ template<typename T> struct X {
|
|||
%}
|
||||
|
||||
%template(Xint) X<int>;
|
||||
|
||||
|
||||
// The function name and parameter name are both 'labels'
|
||||
%inline %{
|
||||
template <typename T>
|
||||
void labels(T labels) {}
|
||||
void voido(int vooo) {}
|
||||
%}
|
||||
|
||||
// TODO: R has a problem with parameter names clashing with the function name
|
||||
#if !defined(SWIGR)
|
||||
%template(ShortLabels) labels<short>;
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue