Bug 139619 - [1.5][compiler] Bogus "name clash ... same erasure" error.
Summary: [1.5][compiler] Bogus "name clash ... same erasure" error.
Status: VERIFIED 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: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-01 17:36 EDT by Brian Miller CLA
Modified: 2006-05-03 11:11 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 Brian Miller CLA 2006-05-01 17:36:28 EDT
Javac 1.5.0_02 happily compiles this pair of source files.  Eclipse 3.2RC2 initially compiles them fine.  But add some whitespace to MMTPProtocol.java and save it (with autobuilding) and this falsely causes a "name clash ... same erasure" compile error.


-------------------------- MMTPProtocol.java ------------------
import java.io.InputStream;
import java.util.HashSet;
import bug.ProtocolManager;

abstract class AbstractProtocol<R, O> implements ProtocolManager<R, O> {
    public AbstractProtocol(HashSet<O> manager, String group) {}
    
    AbstractProtocol(){} 

     public void connect(ConnectType type) { }
}

public abstract class MMTPProtocol extends AbstractProtocol<InputStream, String> {
    public void connect(ConnectType type) {}
}


---------------------------------- bug/ProtocolManager.java --------------
public interface ProtocolManager<R, O>{
    public enum ConnectType {Client,Server}

    public void connect(ConnectType type) ;

    public boolean receive(R input) throws Exception;
}
Comment 1 Brian Miller CLA 2006-05-01 17:38:21 EDT
Oops, please add a "package bug;" statement to ProtocolManager.java.
Comment 2 Olivier Thomann CLA 2006-05-01 21:54:42 EDT
Reproduced with RC2.
Comment 3 Markus Keller CLA 2006-05-02 09:44:13 EDT
Maybe related to bug 139525.
Comment 4 Philipe Mulet CLA 2006-05-02 09:44:41 EDT
Looks like a dup of bug 139525
Comment 5 Philipe Mulet CLA 2006-05-02 10:01:12 EDT
Added regression test: GenericTypeTest#test0977

*** This bug has been marked as a duplicate of 139525 ***
Comment 6 Olivier Thomann CLA 2006-05-03 11:11:05 EDT
Verified using N20060503-0010 for 3.2RC3