[C#, D, Java] Check for collision of parameter names with target language keywords when generating the director glue code.
The situation in which the generated could would previously be invalid is illustrated in the new 'director_keywords' test case. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12358 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
38c88a0931
commit
91523f7510
6 changed files with 35 additions and 16 deletions
|
|
@ -166,6 +166,7 @@ CPP_TEST_CASES += \
|
|||
director_finalizer \
|
||||
director_frob \
|
||||
director_ignore \
|
||||
director_keywords \
|
||||
director_namespace_clash \
|
||||
director_nested \
|
||||
director_overload \
|
||||
|
|
|
|||
13
Examples/test-suite/director_keywords.i
Normal file
13
Examples/test-suite/director_keywords.i
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
// Checks if collisions of argument names with target language keywords are
|
||||
// resolved properly when directors are used (currently only »abstract« for
|
||||
// C#, D and Java is checked).
|
||||
%module(directors="1") director_keywords
|
||||
|
||||
%feature("director") Foo;
|
||||
|
||||
%inline %{
|
||||
struct Foo {
|
||||
virtual ~Foo() {}
|
||||
virtual void bar(int abstract) {}
|
||||
};
|
||||
%}
|
||||
Loading…
Add table
Add a link
Reference in a new issue