From: Alexandre Petit-Bianco Date: Wed, 14 Feb 2001 00:36:22 +0000 (-0800) Subject: parse.y (resolve_qualified_expression_name): Try to resolve as an inner class access... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=863cd85ab56959d8e8dc8932132ed14de8f44398;p=gcc.git 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 * 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 --- diff --git a/gcc/java/ChangeLog b/gcc/java/ChangeLog index 4b343b1c30a..222509aba90 100644 --- a/gcc/java/ChangeLog +++ b/gcc/java/ChangeLog @@ -1,3 +1,8 @@ +2001-02-13 Alexandre Petit-Bianco + + * 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 * decl.c (classdollar_identifier_node): Initialize. diff --git a/gcc/java/parse.y b/gcc/java/parse.y index a2d41897de7..e1ec53b7f7e 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;