swig/Examples/test-suite/java/namespace_chase_runme.java
William S Fulton bf98c5304f Fix type lookup in the presence of using directives and using declarations
Fix some cases of type lookup failure via a combination of both using directives and
using declarations resulting in C++ code that did not compile as the generated type was
not fully qualified for use in the global namespace. Example below:

    namespace Space5 {
      namespace SubSpace5 {
        namespace SubSubSpace5 {
          struct F {};
        }
      }
      using namespace SubSpace5;
      using SubSubSpace5::F;
      void func(SubSubSpace5::F f);
    }
2017-08-16 00:24:25 +01:00

26 lines
666 B
Java

import namespace_chase.*;
public class namespace_chase_runme {
static {
try {
System.loadLibrary("namespace_chase");
} catch (UnsatisfiedLinkError e) {
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
System.exit(1);
}
}
public static void main(String argv[])
{
Struct1A s1a = new Struct1A();
Struct1B s1b = new Struct1B();
Struct1C s1c = new Struct1C();
namespace_chase.sss3a(s1a, s1b, s1c);
namespace_chase.sss3b(s1a, s1b, s1c);
// needs fixing
// namespace_chase.sss3c(s1a, s1b, s1c);
}
}