Bug 112595 - "Type mismatch: cannot convert" using parameterized method return with wildcard type
Summary: "Type mismatch: cannot convert" using parameterized method return with wildca...
Status: VERIFIED DUPLICATE of bug 112268
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.1.2   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-14 01:40 EDT by Trevor Robinson CLA
Modified: 2006-01-10 09:58 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Trevor Robinson CLA 2005-10-14 01:40:03 EDT
I'm running 3.2 M2 (I20050923-1000) and I get this error on code that compiles
fine on javac and 3.1: "Type mismatch: cannot convert from Set<Object> to Set<?
extends SomeClassOrInterface>". The code in question generally looks like this:

    public Set< ? extends ConstructorModifier> getModifiers()
    {
        return Collections.emptySet();
    }

I'm not sure exactly when this broke, as I didn't try it with 3.2 M1, but it
worked in 3.1.
Comment 1 Philipe Mulet CLA 2005-10-14 08:40:07 EDT
Dup. Added GenericTypeTest#test844.

*** This bug has been marked as a duplicate of 112268 ***
Comment 2 Olivier Thomann CLA 2006-01-10 09:58:59 EST
Verified in M20060109-0800 for 3.1.2