Static class functions and member functions by the same name in the same class generate bad Go code. Consider this example:
example.i:
%module example
%inline %{
class Example {
public:
static void Func(int a);
void Func();
};
%}
In example.go, this is generated:
func (p SwigcptrExample) Func(a ...interface{}) {
argc := len(a)
if argc == 0 {
p.Func__SWIG_1()
return
}
if argc == 1 {
p.Func__SWIG_0(a[0].(int))
return
}
fail:
panic("No match for overloaded function call")
}
It looks like SWIG's treating the functions as if they're overloads of the same function, but that's not right.
Closing as a duplicate of 1697616 - https://sourceforge.net/tracker/index.php?func=detail&aid=1697616&group_id=1645&atid=101645