diff options
author | Alexandre Petit-Bianco <apbianco@redhat.com> | 2001-02-13 16:36:22 -0800 |
---|---|---|
committer | Alexandre Petit-Bianco <apbianco@gcc.gnu.org> | 2001-02-13 16:36:22 -0800 |
commit | 863cd85ab56959d8e8dc8932132ed14de8f44398 (patch) | |
tree | 265a24afe7cb9ef83353661a8eccce0c5b5517d8 | |
parent | ca9a9b12e9a59cf5b0652d4987a93239a14ab28d (diff) | |
download | gcc-863cd85ab56959d8e8dc8932132ed14de8f44398.zip gcc-863cd85ab56959d8e8dc8932132ed14de8f44398.tar.gz gcc-863cd85ab56959d8e8dc8932132ed14de8f44398.tar.bz2 |
parse.y (resolve_qualified_expression_name): Try to resolve as an inner class access only if `decl' is a TYPE_DECL.
2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (resolve_qualified_expression_name): Try to resolve as
an inner class access only if `decl' is a TYPE_DECL.
(http://gcc.gnu.org/ml/gcc-patches/2001-02/msg00762.html)
From-SVN: r39653
-rw-r--r-- | gcc/java/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/java/parse.y | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 4b343b1..222509a 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2001-02-13 Alexandre Petit-Bianco <apbianco@redhat.com> + + * parse.y (resolve_qualified_expression_name): Try to resolve as + an inner class access only if `decl' is a TYPE_DECL. + 2001-02-13 Alexandre Petit-Bianco <apbianco@cygnus.com> * decl.c (classdollar_identifier_node): Initialize. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index a2d4189..e1ec53b 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -9362,8 +9362,9 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found) field_decl = lookup_field_wrapper (type, EXPR_WFL_NODE (qual_wfl)); - /* Maybe what we're trying to access an inner class. */ - if (!field_decl) + /* Maybe what we're trying to access to is an inner + class, only if decl is a TYPE_DECL. */ + if (!field_decl && TREE_CODE (decl) == TYPE_DECL) { tree ptr, inner_decl; |