Bug 81568

Summary: [1.5][compiler] Covariant return types fails when an interface extends another interface
Product: [Eclipse Project] JDT Reporter: Mads Andersen <madsie>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M5   
Hardware: All   
OS: All   
Whiteboard:

Description Mads Andersen CLA 2004-12-17 17:24:23 EST
Here's an example that compiles with javac, but fails with the Eclipse compiler:

---8<---
package a;

public interface A {
	public A clone();
}

interface B extends A {
}
---8<---
The error reported by Eclipse is:

The return type is incompatible with A.clone(), Object.clone()
Comment 1 Kent Johnson CLA 2005-01-05 16:37:02 EST
Added MethodVerify test029
Comment 2 David Audel CLA 2005-02-15 12:45:19 EST
Verified in I20050214-0927