Bug 80590 - compiler error "name clash" with generics and erasure/inheritance
Summary: compiler error "name clash" with generics and erasure/inheritance
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: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-09 08:29 EST by mike andrews CLA
Modified: 2004-12-10 01:33 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 mike andrews CLA 2004-12-09 08:29:21 EST
get a compiler error in 3.1M3 with the following interface and implementation,
"Name clash : The method getMap() of type TestInterfaceImpl<A,B> has the same
erasure as getMap() of type TestInterface but does not override it
TestInterfaceImpl.java"
"

here are TestInterface and TestInterfaceImpl that cause this error:

public interface TestInterface<A, B> {

    public A getA();

    public B getB();

    public Map<String, String> getMap();

}


public class TestInterfaceImpl<A,B> implements TestInterface {

    public A getA() {
        return null;
    }

    public B getB() {
        return null;
    }

    // *** THIS METHOD IS FLAGGED WITH COMPILER ERROR
    public Map<String,String> getMap() {
        return null;
    }

}
Comment 1 Jerome Lanneluc CLA 2004-12-10 01:33:34 EST
Thanks for the test case. Verified this now works with HEAD.