diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 2000-10-21 06:28:27 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2000-10-21 07:28:27 +0100 |
commit | e1d565ab93905c52c3cfc312bff123b0c14b36b4 (patch) | |
tree | 06875fe303c3f5b9803db8e7580906811ee27972 /gcc | |
parent | 0ad7574f933e754957d2df890bd84ba3ccea19ee (diff) | |
download | gcc-e1d565ab93905c52c3cfc312bff123b0c14b36b4.zip gcc-e1d565ab93905c52c3cfc312bff123b0c14b36b4.tar.gz gcc-e1d565ab93905c52c3cfc312bff123b0c14b36b4.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/parse.y | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 3932d81..349d5c5 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -423,6 +423,11 @@ Wed Sep 13 11:50:35 2000 Alexandre Petit-Bianco <apbianco@cygnus.com> compression_method fields. * 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> * parse.y (variable_declarator_id:): Better error message. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index 6dc13ea..2a849f7 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -5488,15 +5488,17 @@ do_resolve_class (enclosing, class_type, decl, cl) while (enclosing) { tree name; + tree intermediate; if ((new_class_decl = find_as_inner_class (enclosing, class_type, cl))) return new_class_decl; - + + intermediate = enclosing; /* Explore enclosing contexts. */ - while (INNER_CLASS_DECL_P (enclosing)) + while (INNER_CLASS_DECL_P (intermediate)) { - enclosing = DECL_CONTEXT (enclosing); - if ((new_class_decl = find_as_inner_class (enclosing, + intermediate = DECL_CONTEXT (intermediate); + if ((new_class_decl = find_as_inner_class (intermediate, class_type, cl))) return new_class_decl; } |