Bug 77051

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

Description Bart Geraci CLA 2004-10-26 15:49:28 EDT
Running Build 200410260800 & Java 1.5 : 

This code below compiles without problem using javac, but Eclipse reports error
as seen in comment. The other two versions are fine.

==============
interface C<A> { }
interface PC<X> extends C<X> { } 

interface PO<Y>  {  
  C<Y> proc1();
  C<? super Y> proc2();
  C<? extends Y> proc3();
}

abstract class SPO<Z> implements PO<Z> {
  public C<Z> proc1() { return result1; }
  private final PC<Z> result1 = null;
  
  public C<? super Z> proc2() { return result2; }
  // The above line is reported as error in Eclipse:
  // result2 is underlined and the message says
  // Type mismatch: cannot convert from PC<? super Z> to C<? super Z>
  private final PC<? super Z> result2 = null;
  
  public C<? extends Z> proc3() { return result3; }
  private final PC<? extends Z> result3 = null;
}
==============
Comment 1 Philipe Mulet CLA 2004-10-28 12:14:13 EDT
Tuned wildcard equivalences.
Added regression test: GenericTypeTest#test352.
Fixed.
Comment 2 David Audel CLA 2004-11-04 09:46:02 EST
Verified for 3.1M3 with build I200411040100