Community
Participate
Working Groups
Version: 3.1.0 Build id: I20050315-1100 Given the following code ------------------------ class Cla<A> { A val; public Cla(A x) { val = x; } A getVal() { return val; } } public class Test1 { void proc0(Cla<Long> b0) { final Long t1 = b0.getVal(); final long t2 = b0.getVal(); } void proc1(Cla<? extends Long> obj) { final Long t3 = obj.getVal(); final long t4 = obj.getVal(); } } ------------------------ javac compiles without problems. Eclipse marks the "t4" variable with the error message "Type mismatch: cannot convert from ? extends Long to long"
Similar need for type parameters, though javac fails during emulation apparently. Added AutoboxingTest#test102-103.
Fixed by allowing these in Scope#computeBoxingType.
Verified in I20050510-0010