parse.y (resolve_qualified_expression_name): Try to resolve as an inner class access...
authorAlexandre Petit-Bianco <apbianco@redhat.com>
Wed, 14 Feb 2001 00:36:22 +0000 (16:36 -0800)
committerAlexandre Petit-Bianco <apbianco@gcc.gnu.org>
Wed, 14 Feb 2001 00:36:22 +0000 (16:36 -0800)
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

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

index 4b343b1c30a64636459ce4959cbcfefdc4d14344..222509aba903776c7e4b8038527220c11178a46f 100644 (file)
@@ -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.
index a2d41897de75341d11135e53d3a0785548696d06..e1ec53b7f7e4b52290f2e1a154f60029cd66cdad 100644 (file)
@@ -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;