Ignored enum fixes.
C#/Java - Enums which have been ignored via %ignore and are subsequently used are handled slightly differently. Type wrapper classes are now generated which are effectively a wrapper of an empty enum. Previously in Java uncompilable code was generated and in C# an int was used.
This commit is contained in:
parent
7bec7c1b60
commit
dc8428889e
6 changed files with 36 additions and 7 deletions
|
|
@ -197,6 +197,7 @@ CPP_TEST_CASES += \
|
|||
disown \
|
||||
dynamic_cast \
|
||||
empty \
|
||||
enum_ignore \
|
||||
enum_plus \
|
||||
enum_rename \
|
||||
enum_scope_template \
|
||||
|
|
|
|||
20
Examples/test-suite/enum_ignore.i
Normal file
20
Examples/test-suite/enum_ignore.i
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
%module enum_ignore
|
||||
|
||||
// Similar to enum_missing C test, but with namespaces and using %ignore
|
||||
|
||||
%ignore N::C;
|
||||
|
||||
%inline %{
|
||||
namespace N {
|
||||
enum C { Red, Green, Blue };
|
||||
|
||||
struct Draw {
|
||||
void DrawBW() {}
|
||||
void DrawC(C c) {}
|
||||
void DrawC_Ptr(C* c) {}
|
||||
void DrawC_ConstRef(C const& c) {}
|
||||
};
|
||||
}
|
||||
%}
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue