This is a minor case, but figured I would report it.. with this a.swig:
%module(directors="1", allprotected="1") AModule;
%feature("director");
%inline %{
class A {
protected:
void foo();
};
%}
Because there are no virtual methods, the "SwigDirector_A" class is not generated in the output.
However, since there is a protected non-virtual method, the generated code includes a dynamic_cast to SwigDirector_A.
Perhaps the presence of a protected non-virtual method with allprotected="1" needs to trigger generation of the SwigDirector_ class.
(I used "swig -c++ -java" with swig 2.0.3, if it matters)
Reproducible with git master:
There have been some allprotected fixes recently, but this is still reproducible.