Bug 75134

Summary: [1.5] Type mismatch error generated
Product: [Eclipse Project] JDT Reporter: Bart Geraci <BJGeraci>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: abies
Version: 3.0   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Bart Geraci CLA 2004-09-27 18:31:00 EDT
Given the code on 3.1M2, using Java 1.5.0-rc:
********
import java.util.*;
public class Test2<A> {

  A v2;
  Test2(A a) { v2 = a; }
  
  void func() {
    List<B<A>> l = new ArrayList<B<A>>();
  }

  class B<T> {
    T v1;
    B(T b) {  v1 = b; }
  }
  
}
************
There are 4 cases
(1) class B is defined within class Test2 as above, I get the error
   "Type mismatch: cannot convert from ArrayList<Test2.B<A>> to 
      List<Test2.B<A>>"
(2) class B is defined within class Test2 as above, but now "static", 
    I get the same error.
(3) same as case (2), but the parameter type to List and ArrayList are 
    fully qualified like so: "List<Test2.B<A>>", the I do not get the error.
(4) class B is defined (non-static) outside the Test2 class definition, but
  still within the same file, then I do not get the error.
Comment 1 Kent Johnson CLA 2004-09-29 11:24:58 EDT
Another member type compatibility case
Comment 2 Philipe Mulet CLA 2004-10-25 09:42:00 EDT
First member type (from single/qualified scenario) was not recreating raw
enclosing type when accessed implicitly.

Fixed. Added regression test: GenericTypeTest#test322
Comment 3 Frederic Fusier CLA 2004-10-27 12:13:35 EDT
*** Bug 75525 has been marked as a duplicate of this bug. ***
Comment 4 David Audel CLA 2004-11-04 07:23:30 EST
Verified for 3.1M3 with build I200411040100