Fix constructors in named typedef class declarations
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12784 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
c794d08597
commit
30206f975c
14 changed files with 86 additions and 38 deletions
|
|
@ -26,9 +26,13 @@ public:
|
|||
|
||||
// Test that the correct types are used for typedef struct declarations
|
||||
typedef struct {
|
||||
int something;
|
||||
void m() {}
|
||||
} UnnamedStruct;
|
||||
|
||||
typedef struct NamedStruct {
|
||||
int something;
|
||||
void m() {}
|
||||
} TypedefNamedStruct;
|
||||
|
||||
typedef TypedefNamedStruct DoubleTypedef;
|
||||
|
|
|
|||
12
Examples/test-suite/errors/cpp_no_return_type.i
Normal file
12
Examples/test-suite/errors/cpp_no_return_type.i
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
%module xxx
|
||||
|
||||
struct R {};
|
||||
|
||||
struct S {
|
||||
R() {}
|
||||
};
|
||||
|
||||
typedef struct U {
|
||||
UU() {}
|
||||
} UU;
|
||||
|
||||
|
|
@ -281,6 +281,10 @@ cpp_nested.i:12: Warning 325: Nested class not currently supported (Grok ignored
|
|||
:::::::::::::::::::::::::::::::: cpp_no_access.i :::::::::::::::::::::::::::::::::::
|
||||
cpp_no_access.i:3: Warning 319: No access specifier given for base class 'foo' (ignored).
|
||||
|
||||
:::::::::::::::::::::::::::::::: cpp_no_return_type.i :::::::::::::::::::::::::::::::::::
|
||||
cpp_no_return_type.i:6: Warning 504: Function R must have a return type. Ignored.
|
||||
cpp_no_return_type.i:10: Warning 504: Function UU must have a return type. Ignored.
|
||||
|
||||
:::::::::::::::::::::::::::::::: cpp_nobase.i :::::::::::::::::::::::::::::::::::
|
||||
cpp_nobase.i:3: Warning 401: Nothing known about base class 'Bar'. Ignored.
|
||||
cpp_nobase.i:6: Warning 401: Nothing known about base class 'Bar< int >'. Ignored.
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ cpp_namespace_aliasnot
|
|||
cpp_namespace_aliasundef
|
||||
cpp_nested
|
||||
cpp_no_access
|
||||
cpp_no_return_type
|
||||
cpp_nobase
|
||||
cpp_overload
|
||||
cpp_overload_const
|
||||
|
|
|
|||
|
|
@ -13,4 +13,20 @@ class B
|
|||
typedef RealA A2;
|
||||
int testA (const A2& a) {return a.a;}
|
||||
};
|
||||
|
||||
namespace Space {
|
||||
typedef class AAA {
|
||||
public:
|
||||
AAA() {}
|
||||
} BBB;
|
||||
}
|
||||
|
||||
typedef class AA {
|
||||
public:
|
||||
AA() {}
|
||||
AA(int x) {}
|
||||
int aa_var;
|
||||
int *aa_method(double d) { return 0; }
|
||||
static int *aa_static_method(bool b) { return 0; }
|
||||
} BB;
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -41,3 +41,14 @@ B_t make_b() {
|
|||
return make_a();
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
%inline %{
|
||||
|
||||
typedef struct _Foo {
|
||||
enum { NONAME1, NONAME2 } enumvar;
|
||||
int foovar;
|
||||
void (*fptr)(int);
|
||||
} Foo;
|
||||
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue