This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Java: fix ambiguous qualified name scope bug
- To: gcc-patches at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Subject: Re: Java: fix ambiguous qualified name scope bug
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Date: Thu, 04 Oct 2001 18:28:39 +1200
- References: <3BBBFF4B.1060200@waitaki.otago.ac.nz>
Actual patch below.
Bryce.
2001-10-04 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.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.315
diff -u -r1.315 parse.y
--- parse.y 2001/09/27 19:20:12 1.315
+++ parse.y 2001/10/04 05:24:53
@@ -3636,18 +3635,7 @@
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