Bug 97275 - method reference should not contain type variable anymore
Summary: method reference should not contain type variable anymore
Status: CLOSED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 RC2   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-30 11:01 EDT by Martin Aeschlimann CLA
Modified: 2005-06-10 11:00 EDT (History)
0 users

See Also:


Attachments
Proposed fix (3.46 KB, patch)
2005-05-30 12:06 EDT, Jerome Lanneluc CLA
no flags Details | Diff
Regression test (1018 bytes, patch)
2005-05-30 12:06 EDT, Jerome Lanneluc CLA
no flags Details | Diff

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