+2004-02-26 Andrew Haley <aph@redhat.com>
+
+ PR java/14231:
+ * parse.y (check_interface_throws_clauses): Check for
+ !METHOD_INVISIBLE (iface_method).
+ * class.c (layout_class_methods): Check for CLASS_INTERFACE as
+ well as CLASS_ABSTRACT.
+
2004-02-25 Per Bothner <per@bothner.com>
* parse.y (build_assertion): If we're in an inner class, create the
layout_class_methods (tree this_class)
{
tree method_decl, dtable_count;
- tree super_class;
+ tree super_class, type_name;
if (TYPE_NVIRTUALS (this_class))
return;
else
dtable_count = integer_zero_node;
- if (CLASS_ABSTRACT (TYPE_NAME (this_class)))
+ type_name = TYPE_NAME (this_class);
+ if (CLASS_ABSTRACT (type_name) || CLASS_INTERFACE (type_name))
{
/* An abstract class can have methods which are declared only in
an implemented interface. These are called "Miranda
Also, multiple inheritance with conflicting throws
clauses is fine in the absence of a concrete
implementation. */
- if (method != NULL_TREE && !METHOD_ABSTRACT (method))
+ if (method != NULL_TREE && !METHOD_ABSTRACT (method)
+ && !METHOD_INVISIBLE (iface_method))
{
tree method_wfl = DECL_FUNCTION_WFL (method);
check_throws_clauses (method, method_wfl, iface_method);