Bug 82560 - [assist] Completion fails on parameterized generic method call
Summary: [assist] Completion fails on parameterized generic method call
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: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-11 09:47 EST by Frederic Fusier CLA
Modified: 2005-06-10 12:05 EDT (History)
0 users

See Also:


Attachments
Proposed patch (3.01 KB, text/plain)
2005-06-02 13:09 EDT, David Audel CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2005-01-11 09:47:58 EST
Using HEAD.

Working test case:
Test.java:
  public class Test<T> {
	void foo(RuntimeException re) {}
  }
  class X {
	Test<String> test = new Test<String>();
	{
		test.foo(new Runtime<cursor>());
	}
  }

Completion at <cursor> position works properly and I can complete to
RuntimeException.

Now let change a little bit the test case and make foo a generic method:
Test.java:
  public class Test<T> {
	<U> void foo(RuntimeException re) {}
  }
  class X {
	Test<String> test = new Test<String>();
	{
		test.<String>foo(new Runtime<cursor>());
	}
  }

Now completion does not work at <cursor> position and I only get a beep...
Comment 1 Philipe Mulet CLA 2005-06-02 13:01:48 EDT
+1 for RC2
Comment 2 David Audel CLA 2005-06-02 13:09:31 EDT
Created attachment 22248 [details]
Proposed patch
Comment 3 David Audel CLA 2005-06-02 13:14:52 EDT
Fixed and tests added
  GenericsCompletionParserTest#0189() -> test0192()
  CompleetionTests_1_5#test0233()
Comment 4 Olivier Thomann CLA 2005-06-06 15:02:51 EDT
Verified in N20050606-0010
Comment 5 Olivier Thomann CLA 2005-06-10 12:05:59 EDT
Verified in I20050610-0010.