-
Bug
-
Resolution: Fixed
-
P3
-
5.0, 6, 6u20
-
b03
-
generic, x86
-
generic, windows_2000, windows_xp
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2204974 | 6u25 | Dmitriy Samersoff | P3 | Closed | Fixed | b01 |
JDK-2204263 | 6u24-rev | Dmitriy Samersoff | P3 | Resolved | Fixed | b22 |
JDK-2171748 | 6u22-rev | Dmitriy Samersoff | P3 | Closed | Fixed | b07 |
https://bugs.eclipse.org/bugs/show_bug.cgi?id=98379
This program doesn't compile:
public class X {
<T extends X> T f1() throws Exception{
return null;
}
<U extends X> U f2() throws Exception {
return f1();
}
}
X.java:6: type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds U,X
return f1();
^
1 error
This program doesn't compile:
public class X {
<T extends X> T f1() throws Exception{
return null;
}
<U extends X> U f2() throws Exception {
return f1();
}
}
X.java:6: type parameters of <T>T cannot be determined; no unique maximal instance exists for type variable T with upper bounds U,X
return f1();
^
1 error
- backported by
-
JDK-2204263 Inference fails for type variable return constraint
- Resolved
-
JDK-2171748 Inference fails for type variable return constraint
- Closed
-
JDK-2204974 Inference fails for type variable return constraint
- Closed
- duplicates
-
JDK-6456971 Varargs and inference problem
- Closed
-
JDK-6476073 Capture using super wildcard of type variables doesn't work
- Closed
- relates to
-
JDK-6794295 javac does not compile correct source code with generics.
- Closed
(1 relates to)