swig/Examples/test-suite/abstract_basecast.i
Seth R Johnson 0da8a9bb44 Test ability to manipulate a daughter class from its base class wrapper
Even in the case of just creating a `DerivedClass` this test says:
```
swig/python detected a memory leak of type 'DerivedClass *', no destructor found.
```
even though the destructor is defined in the base class.
2022-02-12 19:40:03 -05:00

20 lines
254 B
OpenEdge ABL

%module abstract_basecast
%inline %{
class BaseClass {
public:
virtual ~BaseClass() { }
virtual void g() = 0;
};
class DerivedClass : public BaseClass {
public:
virtual void g() { }
BaseClass& f() {
return *this;
}
};
%}