Bug 236242 - [compiler][1.7] compiler difference to javac 7 involving parameterized uses of raw methods
Summary: [compiler][1.7] compiler difference to javac 7 involving parameterized uses o...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC All
: P3 normal (vote)
Target Milestone: 3.5 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-09 09:56 EDT by Maxime Daniel CLA
Modified: 2008-12-09 05:31 EST (History)
3 users (show)

See Also:


Attachments
Proposed patch (7.09 KB, patch)
2008-11-07 09:01 EST, Philipe Mulet CLA
no flags Details | Diff
Proposed patch (17.71 KB, patch)
2008-11-07 11:00 EST, Philipe Mulet CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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