Bug 78663 - [1.5][compiler] Generics, assign error with equal types
Summary: [1.5][compiler] Generics, assign error with equal types
Status: VERIFIED FIXED
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: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-15 15:42 EST by Heri CLA
Modified: 2004-12-14 15:56 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 Heri CLA 2004-11-15 15:42:48 EST
Build 200411101000

The following code compiles with javac, but the assignment in test() generates
this error in Eclipse:
Type mismatch: cannot convert from Map<Class<? extends Object>,List<Object>> to
Map<Class<? extends Object>,List<Object>>

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class Test
{
  protected Map<Class<? extends Object>, List<Object>> m_test
    = new HashMap<Class<? extends Object>, List<Object>>();
}

import java.util.List;
import java.util.Map;

public class Test2 extends Test
{
  public Map<Class<? extends Object>, List<Object>> test()
  {
    return m_test;
  }
}
Comment 1 Philipe Mulet CLA 2004-11-16 03:56:01 EST
Addressed in latest iteration of tuning for generics.
Added regression test: GenericTypeTest#test421.
Fixed
Comment 2 Olivier Thomann CLA 2004-12-14 15:56:50 EST
Verified in 200412140800