Bug 103472 - [1.5][compiler] Should detect incompatible super interfaces
Summary: [1.5][compiler] Should detect incompatible super interfaces
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-12 07:52 EDT by Philipe Mulet CLA
Modified: 2007-09-12 11:38 EDT (History)
1 user (show)

See Also:


Attachments

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