6908259: Covariance bug for multiple interface inheritence

David M. Lloyd david.lloyd at redhat.com
Tue Feb 9 08:03:59 PST 2010

On 02/09/2010 09:59 AM, Neal Gafter wrote:
> On Tue, Feb 9, 2010 at 7:47 AM, David M. Lloyd<david.lloyd at redhat.com>  wrote:
>> However, later on in
>> [-cut-]
>>     * If all the inherited methods are abstract, then the class is
>> necessarily an abstract class and is considered to inherit all the abstract
>> methods. A compile-time error occurs if, for any two such inherited methods,
>> one of the methods is not return type substitutable for the other (The
>> throws clauses do not cause errors in this case.)
> Section is specifically about classes.  The test cases of
> interest contain interfaces, not classes, and so does not
> apply.

OK, so if you go with that interpretation then the earlier section 
( seems to say that if you don't override the method explicitly, 
then covariance doesn't apply, which would mean that my simpler patch is 
the correct one and Mr. Cimadamore's T6294779b example class should not 
compile, right?


More information about the compiler-dev mailing list