Bug 87550 - [1.5] [compiler] The method in the type is not applicable for the arguments
Summary: [1.5] [compiler] The method in the type is not applicable for the arguments
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.1 RC1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-03-09 14:39 EST by Bart Geraci CLA
Modified: 2005-05-27 09:44 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.