parse.y (do_resolve_class): Also explore superclasses of intermediate enclosing conte...
authorBryce McKinlay <bryce@albatross.co.nz>
Sat, 21 Oct 2000 06:28:27 +0000 (06:28 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Sat, 21 Oct 2000 06:28:27 +0000 (07:28 +0100)
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

gcc/java/ChangeLog
gcc/java/parse.y

index 3932d8132e83eae0f791d2bb133a62318ebf875e..349d5c5d999d9e3603e09acd3bef821e33e6538c 100644 (file)
@@ -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.
index 6dc13ea50fa0638dcac185c4b3e9303d4be0ed67..2a849f7129bffd12ced68643f606d23b9659a713 100644 (file)
@@ -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;
        }