Bug 345625 - [1.5][compiler] name clash should be reported when inherited methods have the same erasure
Summary: [1.5][compiler] name clash should be reported when inherited methods have the...
Status: VERIFIED DUPLICATE of bug 334306
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7.1   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-12 12:56 EDT by Olivier Thomann CLA
Modified: 2011-08-05 02:54 EDT (History)
1 user (show)

See Also:


Attachments

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