mirror of https://github.com/swig/swig
Adding test case for #2872.
This commit is contained in:
parent
a02fa0007f
commit
d38bd3298c
|
@ -42,5 +42,10 @@ public class using_member_multiple_inherit_runme {
|
|||
mb.multmethod("hi");
|
||||
mb.multmethod(123, 234);
|
||||
mb.multmethod(123, 345, 567);
|
||||
|
||||
// Multiple inheritance, with no override on parent class.
|
||||
Vusing2 vu = new Vusing2();
|
||||
vu.usingmethod(3);
|
||||
vu.usingmethod("hi");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -30,3 +30,8 @@ mb.multmethod(123)
|
|||
mb.multmethod("hi")
|
||||
mb.multmethod(123, 234)
|
||||
mb.multmethod(123, 345, 567)
|
||||
|
||||
# Multiple inheritance, with no override on parent class.
|
||||
vu = Vusing2()
|
||||
vu.usingmethod(3)
|
||||
vu.usingmethod("hi")
|
||||
|
|
|
@ -107,6 +107,23 @@ void cplusplus_testB() {
|
|||
m.multmethod(123, 345, 567);
|
||||
}
|
||||
|
||||
// Multiple inheritance, with no override on parent class.
|
||||
// This checks a corner case with fvirtual and using
|
||||
// See #2872
|
||||
class Vusing {
|
||||
public:
|
||||
virtual void usingmethod(int i) {}
|
||||
};
|
||||
class Vusing1 : public Vusing {
|
||||
public:
|
||||
virtual void usingmethod(int i) {}
|
||||
};
|
||||
class Vusing2 : public Vusing1 {
|
||||
public:
|
||||
using Vusing1::usingmethod;
|
||||
virtual void usingmethod(const char* c) {};
|
||||
};
|
||||
|
||||
/* TODO: fix when using declaration is declared before method, for example change MultMiddleA to:
|
||||
struct MultMiddleB : Mult1, Mult2 {
|
||||
protected: // Note!
|
||||
|
|
Loading…
Reference in New Issue