Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 345625

Summary: [1.5][compiler] name clash should be reported when inherited methods have the same erasure
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Srikanth Sankaran <srikanth_sankaran>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: satyam.kandula
Version: 3.7   
Target Milestone: 3.7.1   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Olivier Thomann CLA 2011-05-12 12:56:10 EDT
This code used to compile using Eclipse or javac 1.6, but it now fails with javac 1.7:

class A<T> {}

interface I {
	void foo(A<String> a);
}

interface J extends I {
	void foo(A<Integer> a);
}

The Eclipse compiler would report name clash errors as soon as the interface J is implemented by a class as there is no way to implement both foo methods.

Looking at 9.4.1 in the JLS, this seems to be a bug. So we might want to fix it for all compliances.
Comment 1 Srikanth Sankaran CLA 2011-05-16 02:42:20 EDT
bug 334306 has a candidate patch.

*** This bug has been marked as a duplicate of bug 334306 ***
Comment 2 Satyam Kandula CLA 2011-07-01 03:18:18 EDT
Verified using Eclipse Java 7 Support(Beta) feature patch v20110623-0900.