Bug 294839 - Eclipse reports name clash error where javac reports none
Summary: Eclipse reports name clash error where javac reports none
Status: VERIFIED INVALID
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.6 M6   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-11-11 00:30 EST by Srikanth Sankaran CLA
Modified: 2010-03-08 04:59 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Srikanth Sankaran CLA 2009-11-11 00:30:30 EST
3.6M3

Follow up of bug 293615 

While working on this bug, I found out several cases where eclipse
reports a name clash while javac reports none.

In org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest

test001a(), test001c(), test002a(), test002c(), test003a() are a few of them.

In these cases though the difference in behavior seems long standing
(going back to at least till 3.4.2) and not a recent regression.

See bug# 293615 comment#9 for some background on how eclipse name
clash algorithm differs from javac's. The fix for 293615 bridged
some of the differences. The current one is raised to address the
others.

A full fix would involve analysing the bridge/synthetic methods
generated for super classes also - something that is complicated
by our throwing out synthetic methods in some cases (e.g BinaryTypeBinding)
Comment 1 Srikanth Sankaran CLA 2010-02-22 01:31:41 EST
See that these tests elicit an error message of the
form "The type J<T> must implement the inherited
abstract method I<A>.foo(A)". Once this missing
method's implementation is given, javac 5,6,7 all
complain about a name clash very much akin to eclipse.

So we can conclude that name clashes are not reported
by javac in the presence of other errors and are reported
only in cases of classes complete otherwise.

So there is no bug here and there is no occasion to change
eclipse behavior. Resolving as INVALID.
Comment 2 Ayushman Jain CLA 2010-03-08 04:29:46 EST
Verified for 3.6M6.
Comment 3 Jay Arthanareeswaran CLA 2010-03-08 04:59:33 EST
Verified.