/tags/rel-1.3.35/Examples/test-suite/typedef_scope.i

# · Swig · 37 lines · 24 code · 13 blank · 0 comment · 0 complexity · c44fd8ed9b4f226bc29ac18e8f504115 MD5 · raw file

  1. // Tests some subtle issues of typedef scoping in C++
  2. %module typedef_scope
  3. %inline %{
  4. typedef char * FooType;
  5. class Bar {
  6. public:
  7. typedef int FooType;
  8. FooType test1(FooType n, ::FooType data) {
  9. return n;
  10. }
  11. ::FooType test2(FooType n, ::FooType data) {
  12. return data;
  13. }
  14. };
  15. class Foo
  16. {
  17. };
  18. typedef Foo FooBar;
  19. class CBaz
  20. {
  21. public:
  22. typedef FooBar Foo;
  23. };
  24. %}