Fix #1960977 - Syntax error parsing derived nested class declaration and member variable instance
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11748 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
107c61d979
commit
0286f6d43e
3 changed files with 7 additions and 1 deletions
|
|
@ -1,6 +1,10 @@
|
|||
Version 1.3.41 (in progress)
|
||||
============================
|
||||
|
||||
2009-11-15: wsfulton
|
||||
Fix #1960977 - Syntax error parsing derived nested class declaration and member
|
||||
variable instance.
|
||||
|
||||
2009-11-14: wsfulton
|
||||
Fix #2310483 - function pointer typedef within extern "C" block.
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ This was reported in bug #909389 */
|
|||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::CC;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::DD;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::EE;
|
||||
%warnfilter(SWIGWARN_PARSE_NAMED_NESTED_CLASS) BB::FF;
|
||||
|
||||
%inline %{
|
||||
|
||||
|
|
@ -19,6 +20,7 @@ struct BB {
|
|||
class CC { int y; };
|
||||
class DD : public A { int z; };
|
||||
struct EE : public A { int z; };
|
||||
struct FF : public A { int z; } ff_instance; // Bug 1960977
|
||||
void useEE(const EE& e) {}
|
||||
};
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -4483,7 +4483,7 @@ cpp_nested : storage_class cpptype ID LBRACE { cparse_start_line = cparse_line
|
|||
/* This adds one shift/reduce. */
|
||||
|
||||
| storage_class cpptype idcolon COLON base_list LBRACE { cparse_start_line = cparse_line; skip_balanced('{','}');
|
||||
} SEMI {
|
||||
} cpp_opt_declarators {
|
||||
$$ = 0;
|
||||
if (cplus_mode == CPLUS_PUBLIC) {
|
||||
$$ = nested_forward_declaration($2, $3);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue