Community
Participate
Working Groups
3.1rc2 The implicit arguments used for a raw type should be converted to raw form. Currently, the upper bounds of formal parameters are used as is. This is demonstrated by unproper error message for following program: import java.util.List; public class X<T extends X<?>> { T get() { return null; } void foo(X x) { String s = x.get(); } } reports: Type mismatch: cannot convert from X<capture-of ?> to String where it should (as javac does) report: Type mismatch: cannot convert from X to String
Other testcase, the following program should be accepted with an unchecked warning. We currently reject it. import java.util.List; public class X<T extends List<String>> { T get() { return null; } void foo(X x) { List<Object> l = x.get(); } }
+1 for RC3 Dirk - pls cast your vote. Fix is trivial.
Added GenericTypeTest#test749-750
+1 fir RC3.
fixed
Verified using N20050616-0010 + JDT/Core HEAD