Bug 97275

Summary: method reference should not contain type variable anymore
Product: [Eclipse Project] JDT Reporter: Martin Aeschlimann <martinae>
Component: CoreAssignee: Jerome Lanneluc <jerome_lanneluc>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.1 RC2   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Regression test none

Description Martin Aeschlimann CLA 2005-05-30 11:01:03 EDT
RC1

I'm not 100% sure, but shouldn't the resolved key of the invocation of foo() not be
  <String> void Test.MethodArguments.foo(List<String> lt, Integer i)
it currently is
  <String> void Test.MethodArguments.foo(List<T> lt, Integer i)

public class MethodArguments {
	public <T> void foo(List<T> lt, Integer i) {
	}
	void use() {
		ArrayList<String> as= null;
		foo(as, 123);
	}
}


(the resolved key we get is 
Lpack/TestIt$MethodArguments;.foo<T:Ljava/lang/Object;>(Ljava/util/List<TT;>;Ljava/lang/Integer;)V%<Ljava/lang/String;>)
Comment 1 Jerome Lanneluc CLA 2005-05-30 11:57:11 EDT
Actually, the binding key itself is good. But the substitution is not done
recursively when transforming it to a Signature.
Comment 2 Jerome Lanneluc CLA 2005-05-30 12:06:31 EDT
Created attachment 21968 [details]
Proposed fix
Comment 3 Jerome Lanneluc CLA 2005-05-30 12:06:51 EDT
Created attachment 21969 [details]
Regression test
Comment 4 Philipe Mulet CLA 2005-05-31 07:38:28 EDT
+1 for RC2
Comment 5 Jerome Lanneluc CLA 2005-05-31 09:43:57 EDT
Released fix and test (renamed to test040())
Comment 6 Olivier Thomann CLA 2005-06-06 20:13:29 EDT
This is not verified in N20050606-0010.
The key is still:
'LMethodArguments;.foo<T:Ljava/lang/Object;>(Ljava/util/List<TT;>;Ljava/lang/Integer;)V%<Ljava/lang/String;>'
Comment 7 Jerome Lanneluc CLA 2005-06-07 06:14:56 EDT
As said in comment #1, the binding key was good and is still good. The problem
was in BindingKey#internalToSignature(). Please verify this. 
Comment 8 Olivier Thomann CLA 2005-06-07 13:47:11 EDT
Verified in N20050606-0010 + JDT/Core HEAD
Comment 9 Frederic Fusier CLA 2005-06-10 11:00:49 EDT
Verified for 3.1 RC2 using build I20050610-0010