+2005-06-13 Tom Tromey <tromey@redhat.com>
+
+ PR java/21844:
+ * parse.y (nested_field_access_p): Handle case where outer field
+ is inherited by enclosing class.
+
2005-06-12 Per Bothner <per@bothner.com>
* class.c (inherits_from_p): Do load_class if needed.
{
if (type_root == decl_type)
return 1;
-
- /* Before we give up, see whether it is a non-static field
- inherited from the enclosing context we are considering. */
- if (!DECL_CONTEXT (TYPE_NAME (type_root))
- && !is_static
- && inherits_from_p (type_root, decl_type))
- return 1;
}
if (TREE_CODE (decl_type) == RECORD_TYPE
if (type_root == decl_type_root)
return 1;
+ /* Before we give up, see whether it is a non-static field
+ inherited from the enclosing context we are considering. */
+ if (!DECL_CONTEXT (TYPE_NAME (type_root))
+ && !is_static
+ && inherits_from_p (type_root, decl_type))
+ return 1;
+
return 0;
}