Bug 105645

Summary: [1.5][compiler] ambiguous error when invoking a overrided generics method
Product: [Eclipse Project] JDT Reporter: Rice Yeh <riceyeh>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1.1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Rice Yeh CLA 2005-07-31 13:01:54 EDT
See the following example. There is ambiguous error in C2#m2 for
the invocation of C2.m1 which inherits (implement) C1.m1 (a abstract method).
Such error does not happen if T does not extends Comparable<T>.

abstract class C1 {
	
	abstract <T extends Comparable<T>> void m1(T t);
}

class C2 extends C1 {
	
	<T extends Comparable<T>> void m1(T t) {
		System.out.println("C2#m1()");
	}
	
	void m2() {
		this.m1(new Integer(1));
	}
}
Comment 1 Kent Johnson CLA 2005-08-02 16:47:18 EDT

*** This bug has been marked as a duplicate of 100869 ***