Bug 80740 - [1.5] Class cannot inherit static method and method from the interface with the same signature
Summary: [1.5] Class cannot inherit static method and method from the interface with t...
Status: RESOLVED WORKSFORME
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 M4   Edit
Assignee: Kent Johnson CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-10 17:47 EST by Olivier Thomann CLA
Modified: 2004-12-13 12:26 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2004-12-10 17:47:27 EST
Using latest, this code compiles fine when it should report an error:

class A<T> {
    public static void foo(Object o) {}
}

interface I<T> {    
    void foo(T t);
}

class X<T> extends A<T> implements I<T> {
}

javac reports:
foo(java.lang.Object) in A cannot implement foo(T) in I; overriding method is static
Comment 1 Kent Johnson CLA 2004-12-13 12:26:30 EST
With the latest I get an error on X:

The type X<T> must implement the inherited abstract method I<T>.foo(T)