parse.y (build_access_to_thisn): Stop when FROM is not an inner class.
authorTom Tromey <tromey@redhat.com>
Thu, 21 Mar 2002 19:00:24 +0000 (19:00 +0000)
committerTom Tromey <tromey@gcc.gnu.org>
Thu, 21 Mar 2002 19:00:24 +0000 (19:00 +0000)
* parse.y (build_access_to_thisn): Stop when FROM is not an inner
class.

From-SVN: r51138

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

index 7afd69d28f1a3cd71cbfb74770ec3fc6de5fd775..2df70b6caa85536af6c51b7746e74f4f1c87360f 100644 (file)
@@ -1,3 +1,8 @@
+2002-03-21  Tom Tromey  <tromey@redhat.com>
+
+       * parse.y (build_access_to_thisn): Stop when FROM is not an inner
+       class.
+
 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
 
        * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
index 8f88c5d6724662344e29b5a83f75b42c0124708e..eecb8add7f845671dd67b2ee730306d0efbba9fd 100644 (file)
@@ -8548,7 +8548,7 @@ build_access_to_thisn (from, to, lc)
 {
   tree access = NULL_TREE;
 
-  while (from != to)
+  while (from != to && PURE_INNER_CLASS_TYPE_P (from))
     {
       if (!access)
         {
@@ -8568,8 +8568,8 @@ build_access_to_thisn (from, to, lc)
          access = make_qualified_primary (cn, access, lc);
        }
 
-      /* if FROM isn't an inter class, that's fine, we've done
-         enough. What we're looking for can be accessed from there. */
+      /* If FROM isn't an inner class, that's fine, we've done enough.
+         What we're looking for can be accessed from there.  */
       from = DECL_CONTEXT (TYPE_NAME (from));
       if (!from)
        break;