Bug 112595

Summary: "Type mismatch: cannot convert" using parameterized method return with wildcard type
Product: [Eclipse Project] JDT Reporter: Trevor Robinson <trevor>
Component: CoreAssignee: JDT-Core-Inbox <jdt-core-inbox>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: nall
Version: 3.2   
Target Milestone: 3.1.2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

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