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:
Olly Betts 2022-07-26 10:24:48 +12:00
commit 4a15f3934d

View file

@ -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 {