parse.y (do_resolve_class): Also explore superclasses of intermediate enclosing contexts when...

2000-08-15  Bryce McKinlay  <bryce@albatross.co.nz>

	* parse.y (do_resolve_class): Also explore superclasses of
	intermediate enclosing contexts when searching for inner classes.

From-SVN: r36990
This commit is contained in:
Bryce McKinlay 2000-10-21 06:28:27 +00:00 committed by Bryce McKinlay
parent 0ad7574f93
commit e1d565ab93
2 changed files with 11 additions and 4 deletions

View File

@ -423,6 +423,11 @@ Wed Sep 13 11:50:35 2000 Alexandre Petit-Bianco <apbianco@cygnus.com>
compression_method fields. compression_method fields.
* zextract.c (read_zip_archive): Collect file compression info. * zextract.c (read_zip_archive): Collect file compression info.
2000-08-15 Bryce McKinlay <bryce@albatross.co.nz>
* parse.y (do_resolve_class): Also explore superclasses of
intermediate enclosing contexts when searching for inner classes.
2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com> 2000-08-11 Alexandre Petit-Bianco <apbianco@cygnus.com>
* parse.y (variable_declarator_id:): Better error message. * parse.y (variable_declarator_id:): Better error message.

View File

@ -5488,15 +5488,17 @@ do_resolve_class (enclosing, class_type, decl, cl)
while (enclosing) while (enclosing)
{ {
tree name; tree name;
tree intermediate;
if ((new_class_decl = find_as_inner_class (enclosing, class_type, cl))) if ((new_class_decl = find_as_inner_class (enclosing, class_type, cl)))
return new_class_decl; return new_class_decl;
intermediate = enclosing;
/* Explore enclosing contexts. */ /* Explore enclosing contexts. */
while (INNER_CLASS_DECL_P (enclosing)) while (INNER_CLASS_DECL_P (intermediate))
{ {
enclosing = DECL_CONTEXT (enclosing); intermediate = DECL_CONTEXT (intermediate);
if ((new_class_decl = find_as_inner_class (enclosing, if ((new_class_decl = find_as_inner_class (intermediate,
class_type, cl))) class_type, cl)))
return new_class_decl; return new_class_decl;
} }