Bug 103472

Summary: [1.5][compiler] Should detect incompatible super interfaces
Product: [Eclipse Project] JDT Reporter: Philipe Mulet <philippe_mulet>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: hwaite
Version: 3.1   
Target Milestone: 3.1.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Philipe Mulet CLA 2005-07-12 07:52:59 EDT
Build 3.1.0

Scenario documented at:
http://forum.java.sun.com/thread.jspa?forumID=316&threadID=642709

exposes a situation where Eclipse doesn't flag a supertype collision.
Comment 1 Philipe Mulet CLA 2005-07-12 07:56:01 EDT
Reduced testcase:
public class X {
	interface B<T> {}

	interface C extends B {}

	class D implements B<Integer> {}

	class F extends D implements C {}
}

should be rejected since F implements both B(raw) and B<Integer>
Comment 2 Philipe Mulet CLA 2005-07-12 08:02:14 EDT
We also mishandle the following variation:
public class X {
	interface B<T> {}

	interface C extends B {}

	class D implements B<Integer> {}

	class V<U extends D & C> {}
}
Comment 3 Philipe Mulet CLA 2005-07-12 10:55:00 EDT
Added GenericTypeTest#test777-778.
Fix consists in using minimalErasedCandidate algorithm when matching
superinterface against superclass (for source types and type variables).

Fixed
Comment 4 Maxime Daniel CLA 2005-08-09 11:25:24 EDT
Verified in 3.2 M1 with build I20050808-2000.
Comment 5 David Audel CLA 2005-09-26 10:57:37 EDT
Verified using M20050923-1430 for 3.1.1