You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericsRegressionTest_9.java
+37Lines changed: 37 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2315,6 +2315,43 @@ public static <U extends BusinessExtractBuilder<U>> U create() {
2315
2315
});
2316
2316
}
2317
2317
2318
+
publicvoidtestGH3351() {
2319
+
// error message is bogus (see https://github.com/eclipse-jdt/eclipse.jdt.core/issues/5078)
2320
+
// but rejecting is in line with javac
2321
+
runNegativeTest(newString[] {
2322
+
"PassThroughGenerics.java",
2323
+
"""
2324
+
import java.util.List;
2325
+
public class PassThroughGenerics {
2326
+
private class MyComp implements Comparable<MyComp> {
2327
+
@Override public int compareTo(MyComp other) { return 0; }
The method sort(java.util.List<E extends java.lang.Comparable<E>>) in the type PassThroughGenerics is not applicable for the arguments (java.util.List<E extends java.lang.Comparable<E>>)
0 commit comments