Bug 88263

Summary: [1.5][compiler] Autobox and extends
Product: [Eclipse Project] JDT Reporter: Bart Geraci <BJGeraci>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 M7   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Bart Geraci CLA 2005-03-16 18:03:05 EST
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"
Comment 1 Philipe Mulet CLA 2005-04-05 07:57:59 EDT
Similar need for type parameters, though javac fails during emulation apparently.
Added AutoboxingTest#test102-103.
Comment 2 Philipe Mulet CLA 2005-04-05 08:55:28 EDT
Fixed by allowing these in Scope#computeBoxingType.
Comment 3 Olivier Thomann CLA 2005-05-11 10:40:50 EDT
Verified in I20050510-0010