Bug 74420

Summary: [1.5] Unexpected "Illegal forward reference to type parameter T"
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: BJGeraci, philippe_mulet
Version: 3.0   
Target Milestone: 3.1 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Frederic Fusier CLA 2004-09-21 09:41:01 EDT
Using build I200409210010.

For following test case:
public class Generic<T> {
	T x;
	<U extends T> T foo(U u) {
		if (u == null)
			return this.x;
		return u;
	}
}
compiler warns "U" in <U extends T>: "Illegal forward reference to type
parameter T" altough parameter T has been already defined...
Comment 1 Frederic Fusier CLA 2004-09-21 09:42:09 EDT
Note that javac 1.5.0-b64 does not complain about this syntax...
Comment 2 Kent Johnson CLA 2004-09-22 15:33:10 EDT
added test305.

Philippe: this is a 1 line change. Can it go into M2?
Comment 3 Philipe Mulet CLA 2004-09-22 15:40:26 EDT
Ok for M2
Comment 4 Kent Johnson CLA 2004-09-22 15:47:20 EDT
Released for M2.
Comment 5 Kent Johnson CLA 2004-09-23 17:32:59 EDT
*** Bug 73414 has been marked as a duplicate of this bug. ***
Comment 6 Frederic Fusier CLA 2004-09-24 05:15:17 EDT
Verified for 3.1 M2 with build I200409231635.