Bug 323927 - Java generics code compiles with Galileo, fails with Helios (method argument erasure clash)
Summary: Java generics code compiles with Galileo, fails with Helios (method argument ...
Status: VERIFIED DUPLICATE of bug 317719
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.6   Edit
Hardware: All Linux
: P3 major with 1 vote (vote)
Target Milestone: 3.7.1   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-29 23:24 EDT by Dominic Owen CLA
Modified: 2011-09-14 11:31 EDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominic Owen CLA 2010-08-29 23:24:27 EDT
Build Identifier: Helios Release Build id: 20100617-1415

We have code that compiles and runs in all versions of eclipse (regardless of platform) except for Helios. The code below exhibits the bug:

public class BugExample {
    protected static <T extends String> T same(Collection<? extends T> p_col) {
        return null;
    }
    protected static <T extends Number> T same(Collection<? extends T> p_col) {
        return null;
    }
}

The error message is: "Method same(Collection<? extends T>) has the same erasure same(Collection<E>) as another method in type BugExample".

Reproducible: Always

Steps to Reproduce:
1. Attempt to compile the above code in Helios.
Comment 1 Prakash Rangaraj CLA 2010-08-29 23:29:27 EDT
Moving to JDT Core ...
Comment 2 Srikanth Sankaran CLA 2010-08-30 00:49:07 EDT
See that this fails to compile with JDK7 (b100) and
the error message is the same as eclipse.

*** This bug has been marked as a duplicate of bug 317719 ***
Comment 3 Olivier Thomann CLA 2010-09-14 10:25:55 EDT
Verified for 3.7M2 using I20100914-0100
Comment 4 Srikanth Sankaran CLA 2011-08-09 10:13:03 EDT
junit has been added as a part of the fix for bug 317719
Comment 5 Satyam Kandula CLA 2011-08-25 09:06:13 EDT
Verified for 3.7.1 RC2 using build M20110824-0800
Comment 6 Olivier Thomann CLA 2011-09-14 11:31:41 EDT
Verified for 3.8M2