Bug 81568 - [1.5][compiler] Covariant return types fails when an interface extends another interface
Summary: [1.5][compiler] Covariant return types fails when an interface extends anothe...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.1 M5   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-17 17:24 EST by Mads Andersen CLA
Modified: 2005-02-15 12:45 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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