diff options
Diffstat (limited to 'Examples/test-suite/typedef_scope.i')
| -rw-r--r-- | Examples/test-suite/typedef_scope.i | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/Examples/test-suite/typedef_scope.i b/Examples/test-suite/typedef_scope.i new file mode 100644 index 0000000..5c04d6c --- /dev/null +++ b/Examples/test-suite/typedef_scope.i @@ -0,0 +1,37 @@ +// Tests some subtle issues of typedef scoping in C++ + +%module typedef_scope + +%inline %{ + +typedef char * FooType; +class Bar { +public: + typedef int FooType; + FooType test1(FooType n, ::FooType data) { + return n; + } + ::FooType test2(FooType n, ::FooType data) { + return data; + } +}; + + + +class Foo +{ +}; + +typedef Foo FooBar; + +class CBaz +{ +public: + typedef FooBar Foo; +}; + + +%} + + + |
