Bug 96586 - [1.5][compiler] Invalid cycle detected
Summary: [1.5][compiler] Invalid cycle detected
Status: CLOSED 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 RC2   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-25 06:59 EDT by Philipe Mulet CLA
Modified: 2005-06-13 10:36 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-05-25 06:59:41 EDT
Build N-20050525

Following code is incorrectly flagged with a cycle:

interface I<T extends I<? super T>> {}
public class X implements I<Y> {}
class Y extends X implements I<X> {}

where only bound check failure should be issued
Comment 1 Philipe Mulet CLA 2005-05-25 07:00:07 EDT
javac says:
X.java:7: type parameter X is not within its bound
class Y extends X implements I<X> {
                               ^
X.java:7: I cannot be inherited with different arguments: <X> and <Y>
class Y extends X implements I<X> {
^
2 errors
Comment 2 Kent Johnson CLA 2005-05-26 13:02:52 EDT
We don't pass a much simpler test:

interface I<T> {}
class X implements I<Y> {}
class Y extends X implements I<Y> {}
Comment 3 Philipe Mulet CLA 2005-06-06 15:47:27 EDT
+1 for RC2
Comment 4 Kent Johnson CLA 2005-06-08 17:09:27 EDT
Added GenericType test729
Comment 5 Olivier Thomann CLA 2005-06-09 09:37:24 EDT
Verified with N20050609-0010 + JDT/Core HEAD
Comment 6 Maxime Daniel CLA 2005-06-10 09:54:10 EDT
Verified for 3.1 RC2 using build I20050610-0010
Comment 7 Frederic Fusier CLA 2005-06-10 10:27:18 EDT
close
Comment 8 Kent Johnson CLA 2005-06-13 10:36:59 EDT
*** Bug 81949 has been marked as a duplicate of this bug. ***