Bug 140466 - Erroneous compile error overriding a method
Summary: Erroneous compile error overriding a method
Status: RESOLVED DUPLICATE of bug 139525
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 RC3   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-06 07:36 EDT by Matt CLA
Modified: 2006-05-07 04:54 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 Matt CLA 2006-05-06 07:36:17 EDT
3.2RC2 gives a compile error for the test case below.  RC1 behaved correctly, giving no compile error.

public interface Foo< ContextType extends Foo.Context >
{
   class Context
   {
      // ...
   };
}
public abstract class Bar
{
   public abstract void run( Foo.Context context );
}
public class ConcreteBar extends Bar
{
   /**
    * @see Bar#run(Foo.Context)
    */
   @Override
   public void run( Foo.Context context )
   {
   }
}

I believe this code is legitimate, but with RC2 this gives the following errors:

Name clash: The method run(Foo.Context) of type ConcreteBar has the same erasure as run(Foo.Context) of type Bar but does not override it

The method run(Foo.Context) of type ConcreteBar must override a superclass method

The type ConcreteBar must implement the inherited abstract method Bar.run(Foo.Context)
Comment 1 Frederic Fusier CLA 2006-05-06 13:29:22 EDT
I cannot reproduce using 3.2 RC3. It sounds to be a duplicate of bug 139525.
Please try with RC3 and let us know if you confirm that your problem is fixed, thanks


*** This bug has been marked as a duplicate of 139525 ***
Comment 2 Matt CLA 2006-05-07 04:54:32 EDT
Confirmed that RC3 resolves this issue.