mirror of https://github.com/swig/swig
Work around D test suite failure due to issue #254.
Object is currently a D keyword for the purposes of SWIG (that's in fact a little too strict, but Object is the root of the class hierarchy and some parts of the code break). 'template_typedef_typedef' is supposed to test.
This commit is contained in:
parent
0d6472525c
commit
a9d7b7f40c
|
@ -12,13 +12,13 @@ public class template_typedef_typedef_runme {
|
|||
}
|
||||
|
||||
public static void main(String argv[]) {
|
||||
ObjectBase ob1 = new ObjectBase();
|
||||
ob1.getBlabla1(new ObjectBase());
|
||||
Object1Base ob1 = new Object1Base();
|
||||
ob1.getBlabla1(new Object1Base());
|
||||
Object2Base ob2 = new Object2Base();
|
||||
ob2.getBlabla2(new Object2Base());
|
||||
|
||||
Factory factory = new Factory();
|
||||
factory.getBlabla3(new ObjectBase());
|
||||
factory.getBlabla3(new Object1Base());
|
||||
factory.getBlabla4(new Object2Base());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
%module template_typedef_typedef
|
||||
|
||||
// Github issue #50
|
||||
// The Object2::getBlabla2 and Object::getBlabla1 functions were not resolving to the correct template types
|
||||
// The Object2::getBlabla2 and Object1::getBlabla1 functions were not resolving to the correct template types
|
||||
|
||||
%inline%{
|
||||
|
||||
|
@ -20,7 +20,7 @@ namespace TT{
|
|||
};
|
||||
};
|
||||
template <typename T>
|
||||
class Object:public T {
|
||||
class Object1:public T {
|
||||
public:
|
||||
void getBlabla1(typename T::ABCD::CC1 c) {
|
||||
};
|
||||
|
@ -29,7 +29,7 @@ namespace TT{
|
|||
|
||||
class Factory {
|
||||
public:
|
||||
typedef TT::Object<Base> CC1;
|
||||
typedef TT::Object1<Base> CC1;
|
||||
typedef TT::Object2<Base> CC2;
|
||||
void getBlabla4(CC2 c) {
|
||||
};
|
||||
|
@ -38,6 +38,6 @@ class Factory {
|
|||
};
|
||||
%}
|
||||
|
||||
%template(ObjectBase) TT::Object<Base>;
|
||||
%template(Object1Base) TT::Object1<Base>;
|
||||
%template(Object2Base) TT::Object2<Base>;
|
||||
|
||||
|
|
Loading…
Reference in New Issue