Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 129849 Details for
Bug 269986
[1.5][compiler] eclipse-compiler diffs to javac - misses a bug with generic and wildcard
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
java-source to show the bug
Utl.java (text/plain), 1.96 KB, created by
kurt
on 2009-03-25 11:35:04 EDT
(
hide
)
Description:
java-source to show the bug
Filename:
MIME Type:
Creator:
kurt
Created:
2009-03-25 11:35:04 EDT
Size:
1.96 KB
patch
obsolete
>public class Utl { > > // --- simple > public static interface F1Itf<T> > extends Comparable<T> { > int getSize(); > > T getField(); > } > > // --- nested typed-generic > public static interface F2Itf<T> > extends Comparable<F2Itf<T>> { > int getSize(); > > T getField(); > } > > // --- Comparable > > // Sun: ERROR > // Eclipse: ERROR > public static <T extends Comparable<?>> int cmp1(final T t1, final T t2) { > return t1.compareTo(t2); > } > > // Sun: OK > // Eclipse: OK > public static <T extends Comparable<T>> int cmp2(final T t1, final T t2) { > return t1.compareTo(t2); > } > > // --- F1Itf > > // Sun: ERROR > // Eclipse: ERROR > public static <T extends F1Itf<?>> int cmp3(final T t1, final T t2) { > return t1.compareTo(t2); > } > > // Sun: OK > // Eclipse: OK > public static <T extends F1Itf<T>> int cmp4(final T t1, final T t2) { > return t1.compareTo(t2); > } > > // --- F2Itf > > // Sun: ERROR > // Eclipse: OK -> wildcard in F2Itf > public static <T extends F2Itf<?>> int cmp5(final T t1, final T t2) { > return t1.compareTo(t2); > } > > // Sun: OK > // Eclipse: OK > public static <T extends F2Itf<T>> int cmp6(final T t1, final T t2) { > return t1.compareTo(t2); > } >} > >/* > * javac -version: javac 1.6.0_11 > * java -version: > * java version "1.6.0_11" > * Java(TM) SE Runtime Environment (build 1.6.0_11-b03) > * Java HotSpot(TM) Client VM (build 11.0-b16, mixed mode, sharing) > * > * Utl.java:24: compareTo(capture#407 of ?) in java.lang.Comparable<capture#407 of ?> cannot be applied to (T) > * return t1.compareTo(t2); > * ^ > * Utl.java:38: compareTo(capture#825 of ?) in java.lang.Comparable<capture#825 of ?> cannot be applied to (T) > * return t1.compareTo(t2); > * ^ > * Utl.java:52: compareTo(Utl.F2Itf<capture#105 of ?>) in java.lang.Comparable<Utl.F2Itf<capture#105 of ?>> cannot be applied to (T) > * return t1.compareTo(t2); > * ^ > * 3 errors > */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 269986
: 129849