Add test showing typemap failure
This commit is contained in:
parent
df86ec5af6
commit
4824b56e59
1 changed files with 25 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ template<typename T> struct TemplateTest1 {
|
||||||
%template(TTint) TemplateTest1< int >;
|
%template(TTint) TemplateTest1< int >;
|
||||||
|
|
||||||
%inline %{
|
%inline %{
|
||||||
void extratest(const TemplateTest1< YY > &t,
|
void extratest(const TemplateTest1< YY > &t,
|
||||||
const TemplateTest1< ZZ > &tt,
|
const TemplateTest1< ZZ > &tt,
|
||||||
const TemplateTest1< int > &ttt)
|
const TemplateTest1< int > &ttt)
|
||||||
{}
|
{}
|
||||||
|
|
@ -38,3 +38,27 @@ template<typename T> struct TemplateTest1 {
|
||||||
%inline %{
|
%inline %{
|
||||||
void wasbug(TemplateTest1< int >::Double wbug) {}
|
void wasbug(TemplateTest1< int >::Double wbug) {}
|
||||||
%}
|
%}
|
||||||
|
|
||||||
|
/* Test bug where the %apply directive was ignored inside anonymous template
|
||||||
|
* instantiations */
|
||||||
|
|
||||||
|
template<class T>
|
||||||
|
struct Foo {
|
||||||
|
%typemap(in) Foo<T> ""
|
||||||
|
%apply Foo<T> { const Foo<T> & }
|
||||||
|
};
|
||||||
|
|
||||||
|
%{
|
||||||
|
template<class T> struct Foo {};
|
||||||
|
%}
|
||||||
|
|
||||||
|
%template(Foo_int) Foo<int>;
|
||||||
|
%template() Foo<double>;
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
void this_works(Foo<int> f) {}
|
||||||
|
void this_also_works(const Foo<int>& f) {}
|
||||||
|
void this_also_also_works(Foo<double> f) {}
|
||||||
|
void this_fails(const Foo<double>& f) {}
|
||||||
|
%}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue