Fix MSVC error in nested_class.i
MSVC now fails with: error C4596: 'foo': illegal qualified name in member declaration Such redundant qualification is invalid. Compilers used to be permissive here (so it's useful for SWIG to handle it), but compilers increasingly complain about it so adjust the testcase to show the compiler a valid version, and only test the redundant qualification with SWIG.
This commit is contained in:
parent
9d3fb41eef
commit
4a15f3934d
1 changed files with 7 additions and 2 deletions
|
|
@ -133,8 +133,13 @@ struct Outer {
|
|||
Integer x;
|
||||
} InnerClass4Typedef;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
int Outer::foo(){ return 1; } // should correctly ignore qualification here (#508)
|
||||
#ifdef SWIG
|
||||
// SWIG should ignore the redundant qualification here (#508)...
|
||||
int Outer::foo(){ return 1; }
|
||||
#else
|
||||
// ..but that redundant qualification is actually invalid and many compilers
|
||||
// now reject it with an error, so feed a valid version to the compiler.
|
||||
int foo(){ return 1; }
|
||||
#endif
|
||||
|
||||
typedef struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue