Fix uncompileable code when %rename results in two enum items with the same name
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12098 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d30054b5f6
commit
257ce20f30
4 changed files with 17 additions and 1 deletions
|
|
@ -180,6 +180,7 @@ CPP_TEST_CASES += \
|
|||
disown \
|
||||
dynamic_cast \
|
||||
empty \
|
||||
enum_rename \
|
||||
enum_scope_template \
|
||||
enum_template \
|
||||
enum_thorough \
|
||||
|
|
|
|||
12
Examples/test-suite/enum_rename.i
Normal file
12
Examples/test-suite/enum_rename.i
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
%module enum_rename
|
||||
|
||||
%warnfilter(SWIGWARN_PARSE_REDEFINED) S_May;
|
||||
|
||||
// %rename with rxspencer can do the equivalent of these two renames, which was resulting in uncompileable code
|
||||
%rename(May) M_May;
|
||||
%rename(May) S_May;
|
||||
|
||||
%inline %{
|
||||
enum Month { M_Jan, M_May, M_Dec };
|
||||
enum Severity { S_May, S_Can, S_Must };
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue