aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/parse.y
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/java/parse.y')
-rw-r--r--gcc/java/parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/java/parse.y b/gcc/java/parse.y
index 40e7801..4ab60e9 100644
--- a/gcc/java/parse.y
+++ b/gcc/java/parse.y
@@ -9434,7 +9434,7 @@ resolve_qualified_expression_name (wfl, found_decl, where_found, type_found)
/* Check on accessibility here */
if (not_accessible_p (current_class, field_decl,
- TREE_TYPE (decl), from_super))
+ DECL_CONTEXT (field_decl), from_super))
{
parse_error_context
(qual_wfl,
@@ -9559,7 +9559,7 @@ not_accessible_p (reference, member, where, from_super)
/* If where is active, access was made through a
qualifier. Access is granted if the type of the qualifier is
or is a sublass of the type the access made from (6.6.2.1.) */
- if (where && !inherits_from_p (where, reference))
+ if (where && !inherits_from_p (reference, where))
return 1;
/* Otherwise, access is granted if occuring from the class where