diff options
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r-- | gcc/java/parse.y | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y index ebaede8ab12..11087192bec 100644 --- a/gcc/java/parse.y +++ b/gcc/java/parse.y @@ -8389,13 +8389,6 @@ nested_field_access_p (tree type, tree decl) { 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 @@ -8416,6 +8409,13 @@ nested_field_access_p (tree type, tree decl) 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; } |