* typeck.c (lookup_do): Look up interfaces for the original class,
not the base class.
* parse.y (java_check_regular_methods): Fix diagnostic message for
more restrictive overriding of a method from an interface.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@103909
138bc75d-0d04-0410-961f-
82ee72b054a4
+2005-09-05 Ranjit Mathew <rmathew@hotmail.com>
+
+ PR java/23431
+ * typeck.c (lookup_do): Look up interfaces for the original class,
+ not the base class.
+ * parse.y (java_check_regular_methods): Fix diagnostic message for
+ more restrictive overriding of a method from an interface.
+
2005-08-16 Tom Tromey <tromey@redhat.com>
* class.c (make_class_data): Always emit JV_STATE_PRELOADING for
tree found_decl = TYPE_NAME (DECL_CONTEXT (found));
parse_error_context (method_wfl, "Class %qs must override %qs with a public method in order to implement interface %qs",
IDENTIFIER_POINTER (DECL_NAME (class_decl)),
- lang_printable_name (method, 2),
+ lang_printable_name (found, 0),
IDENTIFIER_POINTER (DECL_NAME (found_decl)));
}
tree signature, tree (*signature_builder) (tree))
{
tree method;
+ tree orig_class = searched_class;
if (searched_class == NULL_TREE)
return NULL_TREE;
/* If that doesn't work, look in our interfaces. */
if (flags & SEARCH_INTERFACE)
- method = find_method_in_interfaces (searched_class, flags, method_name,
+ method = find_method_in_interfaces (orig_class, flags, method_name,
signature, signature_builder);
return method;