Bug 87550

Summary: [1.5] [compiler] The method in the type is not applicable for the arguments
Product: [Eclipse Project] JDT Reporter: Bart Geraci <BJGeraci>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: mlists
Version: 3.1   
Target Milestone: 3.1 RC1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Bart Geraci CLA 2005-03-09 14:39:18 EST
Version: 3.1.0
Build id: I20050308-0835

Given the code below: 
*******************
import java.util.ArrayList;
import java.util.Collection;

interface Intf1<P,Q> {}

class Class1<T,U,V extends Class1<T,U,V>>
 extends ArrayList<V>
 implements Intf1<T,U> {

 public final void thing(U arg) {
   // thing is underlined below
   Class1.thing(this, arg);
 }
	
 public static final <X,Y> void thing
   (Collection<? extends Intf1<X,Y>> arg1, Y arg2) {
 }
}
	
*******************

Javac does not complain.

Eclipse complains with the statement:
The method thing(Object) in the type Class1 is not applicable for the arguments
(Class1<T,U,V>, U)
Comment 1 Philipe Mulet CLA 2005-05-16 10:25:07 EDT
Added GenericTypeTest#test562-564.
Problem comes from '? extends Intf1<X,Y>' not tagged as holding type variables,
and thus optimizing out some of the type inference.

Fixed
Comment 2 Maxime Daniel CLA 2005-05-27 09:43:38 EDT
Verified on build I20050527-0010.