parse.y (resolve_qualified_expression_name): In case of inaccessible class don't use not_accessible_field_error...

* parse.y (resolve_qualified_expression_name):  In case of inaccessible
	class don't use not_accessible_field_error, which can get confused.

From-SVN: r77525
This commit is contained in:
Per Bothner 2004-02-08 23:41:55 -08:00 committed by Per Bothner
parent f19e9e4d16
commit e333a61815
2 changed files with 13 additions and 1 deletions

View file

@ -1,3 +1,8 @@
2004-02-08 Per Bothner <per@bothner.com>
* parse.y (resolve_qualified_expression_name): In case of inaccessible
class don't use not_accessible_field_error, which can get confused.
2004-02-05 Kelley Cook <kcook@gcc.gnu.org>
Make-lang.in (po-generated): Delete.

View file

@ -9869,7 +9869,14 @@ resolve_qualified_expression_name (tree wfl, tree *found_decl,
}
if (not_accessible_p (TREE_TYPE (decl), decl, type, 0))
return not_accessible_field_error (qual_wfl, decl);
{
parse_error_context
(qual_wfl, "Can't access %s class '%s' from '%s'",
java_accstring_lookup (get_access_flags_from_decl (decl)),
IDENTIFIER_POINTER (DECL_NAME (decl)),
IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (current_class))));
return 1;
}
check_deprecation (qual_wfl, decl);
type = TREE_TYPE (decl);