+2000-09-12 Tom Tromey <tromey@cygnus.com>
+
+ * expr.c (pop_type_0): Return `Object' if trying to merge two
+ interface types.
+ * verify.c (merge_types): Don't return `TYPE_UNKNOWN' for
+ interface types; `Object' is always a valid supertype.
+
2000-09-12 Tom Tromey <tromey@cygnus.com>
Fix for PR gcj/33:
/* This is a kludge, but matches what Sun's verifier does.
It can be tricked, but is safe as long as type errors
(i.e. interface method calls) are caught at run-time. */
- else if (CLASS_INTERFACE (TYPE_NAME (TREE_TYPE (type)))
- && t == object_ptr_type_node)
- return t;
+ /* FIXME: this is worse than a kludge, probably. */
+ return object_ptr_type_node;
}
return NULL_TREE;
}
if (CLASS_INTERFACE (TYPE_NAME (tt1)))
{
+ /* FIXME: should see if two interfaces have a common
+ superinterface. */
if (CLASS_INTERFACE (TYPE_NAME (tt2)))
{
/* This is a kludge, but matches what Sun's verifier does.
if (can_widen_reference_to (tt2, tt1))
return type1;
else
- return TYPE_UNKNOWN;
+ return object_ptr_type_node;
}
}
else if (CLASS_INTERFACE (TYPE_NAME (tt2)))
if (can_widen_reference_to (tt1, tt2))
return type2;
else
- return TYPE_UNKNOWN;
+ return object_ptr_type_node;
}
type1 = tt1;