Bug 105645 - [1.5][compiler] ambiguous error when invoking a overrided generics method
Summary: [1.5][compiler] ambiguous error when invoking a overrided generics method
Status: RESOLVED DUPLICATE of bug 100869
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1.1   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-31 13:01 EDT by Rice Yeh CLA
Modified: 2005-08-02 16:47 EDT (History)
0 users

See Also:


Attachments

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