Improve target language symbol tables for Java and C#, using different scopes for the constants interface, module class and intermediary class rather than incorrectly putting all the symbols into one scope
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11857 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6fe7287ad3
commit
4bf5049397
5 changed files with 71 additions and 16 deletions
|
|
@ -305,6 +305,7 @@ CPP_TEST_CASES += \
|
|||
static_const_member_2 \
|
||||
struct_initialization_cpp \
|
||||
struct_value \
|
||||
symbol_clash \
|
||||
template \
|
||||
template_arg_replace \
|
||||
template_arg_scope \
|
||||
|
|
|
|||
28
Examples/test-suite/symbol_clash.i
Normal file
28
Examples/test-suite/symbol_clash.i
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
%module symbol_clash
|
||||
|
||||
// ::Vector and ::Text::Vector were incorrectly clashing in the target language symbol tables
|
||||
|
||||
#if defined(SWIGJAVA) || defined(SWIGCSHARP)
|
||||
|
||||
#if defined(SWIGJAVA)
|
||||
%include "enumtypeunsafe.swg"
|
||||
#elif defined(SWIGCSHARP)
|
||||
%include "enumsimple.swg"
|
||||
#endif
|
||||
|
||||
%inline %{
|
||||
class Vector
|
||||
{
|
||||
};
|
||||
|
||||
namespace Text
|
||||
{
|
||||
enum Preference
|
||||
{
|
||||
Raster,
|
||||
Vector
|
||||
};
|
||||
}
|
||||
%}
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue