Fix incorrect typemaps being used for a symbol within a templated type

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12747 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2011-06-20 17:46:38 +00:00
commit d38e6bdf43
5 changed files with 41 additions and 4 deletions

View file

@ -2,8 +2,8 @@
/* Test bug in 1.3.40 where the presence of a generic/unspecialized typemap caused the incorrect specialized typemap to be used */
%typemap(in) SWIGTYPE "/*_this_will_not_compile_SWIGTYPE_ \"$type\" */ "
%typemap(in) const SWIGTYPE & "/*_this_will_not_compile_const_SWIGTYPE_REF_\"$type\" */ "
%typemap(in) SWIGTYPE "_this_will_not_compile_SWIGTYPE_ \"$type\" "
%typemap(in) const SWIGTYPE & "_this_will_not_compile_const_SWIGTYPE_REF_\"$type\" "
%typemap(in) const TemplateTest1 & {$1 = (TemplateTest1<YY> *)0; /* in typemap generic for $type */}
%typemap(in) const TemplateTest1< ZZ > & {$1 = (TemplateTest1<ZZ> *)0; /* in typemap ZZ for $type */}
@ -12,6 +12,7 @@
%inline %{
template<typename T> struct TemplateTest1 {
void setT(const TemplateTest1& t) {}
typedef double Double;
};
%}
@ -32,3 +33,8 @@ template<typename T> struct TemplateTest1 {
{}
%}
%typemap(in) TemplateTest1 "_this_will_not_compile_TemplateTest_ \"$type\" "
%inline %{
void wasbug(TemplateTest1< int >::Double wbug) {}
%}