title: Why is my swig generated tcl code missing methods at runtime?
body: <p>I am using swig 4.0.2 to generate a package for tcl use.</p>
  <p>The source .i file contains lots of classes and the generated _wrap.cpp file contains the all the classes with their methods as I would expect and everything compiles ok with no warnings.</p>
  <p>However, for at least 1 class, when I come to call a method on a instance from a tcl script I get a runtime error saying the method does not exist. The error also dumps out all the available methods of the class. The method I am trying to call, along with a few others, does not exist in that list.</p>
  <pre><code>Invalid method. Must be one of: configure cget -acquire -disown -delete ...
  </code></pre>
  <p>There doesn't appear to be any pattern to which methods are not in the list though it is consistent which methods are missing.</p>
  <p>The missing methods are scattered through the declared swig interface. ie they aren't at the beginning or end, nor all in one block. There is no pattern to their names nor function signature that I can see.</p>
  <p>The function being run when the error occurs is <code>SWIG_Tcl_MethodCommand</code>: a function generated by swig. It is responsible for looking up the method by name and printing out the error code.</p>
  <p>The function wrappers all exist and are referenced in the class's <code>swig_method</code> array.</p>
  <p>I would have imagined that if a method was not going to be found by the look up it would be all or nothing.</p>
  <p>Does anyone have ideas where I could look for errors?
  I'm afraid I haven't been able to isolate into a small testcase that I can share.</p>
  <p>I'm using swig 4.02, generating code for tcl8 and compiling under c++ 14.</p>