Community
Participate
Working Groups
Eclipse 3.6 compiles the following code without any errors interface List<E> {} interface I {} public class X { <T extends I> void main(List<T> clazz, List<X> xList) { boolean b = clazz == xList || xList == clazz; } } while javac complains: X.java:6: incomparable types: List<T> and List<X> boolean b = clazz == xList || ^ X.java:7: incomparable types: List<X> and List<T> xList == clazz; ^ 2 errors C:\jtests>rem C:\ibm-java2-sdk-50-win-i386\bin\javac.exe -Xlint:unchecked -Xlint :rawtypes -verbose -sourcepath c:\jtests X.java but if you make Test a final class, eclipse also complains. In the exact same contexts, eclipse has no hesitation in flagging an assignment as being illegal. See also bug 322531
I'll investigate this.
Same issue as bug 322531 *** This bug has been marked as a duplicate of bug 322531 ***