/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
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
1// Tests some subtle issues of typedef scoping in C++
2
3%module typedef_scope
4
5%inline %{
6
7typedef char * FooType;
8class Bar {
9public:
10 typedef int FooType;
11 FooType test1(FooType n, ::FooType data) {
12 return n;
13 }
14 ::FooType test2(FooType n, ::FooType data) {
15 return data;
16 }
17};
18
19
20
21class Foo
22{
23};
24
25typedef Foo FooBar;
26
27class CBaz
28{
29public:
30 typedef FooBar Foo;
31};
32
33
34%}
35
36
37