Bug 236242

Summary: [compiler][1.7] compiler difference to javac 7 involving parameterized uses of raw methods
Product: [Eclipse Project] JDT Reporter: Maxime Daniel <maxime_daniel>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jerome_lanneluc, kent_johnson, philippe_mulet
Version: 3.4   
Target Milestone: 3.5 M4   
Hardware: PC   
OS: All   
Whiteboard:
Attachments:
Description Flags
Proposed patch
none
Proposed patch none

Description Maxime Daniel CLA 2008-06-09 09:56:46 EDT
On the following test case (which is GenericTypeTest#245) and a few others:
public class X <T> { 
	<G> T foo(G g) {
		return null;
	}
	
	public static void main(String[] args) {
		X rx = new X();
		rx.<String>foo("hello"); // Eclipse error here
	}
}

javac 7 does not complain, as if some slack was now allowed for raw methods to be used as their non-rawified counterparts. This might indicate an inflexion in the specification intents, or else a mere javac bug (will check with more recent versions - tried 7 b24 so far).
Comment 1 Philipe Mulet CLA 2008-11-07 09:01:57 EST
Created attachment 117313 [details]
Proposed patch
Comment 2 Philipe Mulet CLA 2008-11-07 11:00:44 EST
Created attachment 117331 [details]
Proposed patch

tuned other existing tests
Comment 3 Philipe Mulet CLA 2008-11-07 11:02:33 EST
Released for 3.5M4.
Fixed
Comment 4 Philipe Mulet CLA 2008-12-09 05:27:54 EST
Need to set compliance to 1.7 to verify.
Comment 5 Jerome Lanneluc CLA 2008-12-09 05:31:53 EST
Verified for 3.5M4 using I20081209-0100