parse.y (find_as_inner_class): Don't disregard the enclosing scope when name qualifie...
authorBryce McKinlay <bryce@waitaki.otago.ac.nz>
Tue, 9 Oct 2001 05:40:35 +0000 (05:40 +0000)
committerBryce McKinlay <bryce@gcc.gnu.org>
Tue, 9 Oct 2001 05:40:35 +0000 (06:40 +0100)
        * parse.y (find_as_inner_class): Don't disregard the enclosing scope
        when name qualifier matches a package name.

From-SVN: r46113

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

index 52ccdabebe3958e0239194a463e3dab83051ac2b..d32998b3027bb80e391e6e672f7cd384517394e7 100644 (file)
@@ -1,3 +1,8 @@
+2001-10-09  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
+
+       * parse.y (find_as_inner_class): Don't disregard the enclosing scope
+       when name qualifier matches a package name.
+
 2001-10-08  Tom Tromey  <tromey@redhat.com>
 
        Fix for PR java/4489:
index 2737579d53656df8e59d6af047532831d9faf9d0..180b99ddcef87b22e359bfbc4da1e99090de7a0a 100644 (file)
@@ -3636,18 +3636,7 @@ find_as_inner_class (enclosing, name, cl)
          acc = merge_qualified_name (acc, 
                                      EXPR_WFL_NODE (TREE_PURPOSE (qual)));
          BUILD_PTR_FROM_NAME (ptr, acc);
-
-         /* Don't try to resolve ACC as a class name if it follows
-            the current package name. We don't want to pick something
-            that's accidentally there: for example `a.b.c' in package
-            `a.b' shouldn't trigger loading `a' if it's there by
-            itself. */
-         if (ctxp->package
-             && strstr (IDENTIFIER_POINTER (ctxp->package),
-                        IDENTIFIER_POINTER (acc)))
-           decl = NULL;
-         else
-           decl = do_resolve_class (NULL_TREE, ptr, NULL_TREE, cl);
+         decl = do_resolve_class (NULL_TREE, ptr, NULL_TREE, cl);
        }
 
       /* A NULL qual and a decl means that the search ended