Bug 113945 - No codeassist in anonymous class in generics
Summary: No codeassist in anonymous class in generics
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.2 M4   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-27 05:33 EDT by Philipe Mulet CLA
Modified: 2005-12-12 09:37 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Philipe Mulet CLA 2005-10-27 05:33:55 EDT
Build id: I20051018-0932

No 'compareTo' completion is offered when completing inside the 'compareTo'
message sending expression below.

import java.util.*;
public class X <E,K extends Comparable<K>> {

	E[] source;
	F<E, K> f;
		
void init(){
	final Map<E,K> values = new HashMap<E,K>(this.source.length);
	new Comparator<E>(){
		public int compare(E o1, E o2) {
			return values.get(o1).compareTo(values.get(o2));
		}
	};
}
}
abstract class F<I,O> {
	public abstract O get(I in);
}
Comment 1 Philipe Mulet CLA 2005-10-27 05:36:02 EDT
Also, hovering on the leading receiver (values.get(o1)) reveals that the some
type information got altered. It shows: 'K get(Object)' instead of 'K get(E)'.
Note that this may be a different bug in codeselect.
Comment 2 David Audel CLA 2005-10-27 09:11:30 EDT
the bug described in comment 1 is invalid. The parameter's type of the get
method is declared as Object.
Comment 3 David Audel CLA 2005-11-04 12:17:50 EST
Fixed and tests added
  CompletionTests_1_5#test0261() -> test 0263()
Comment 4 Jerome Lanneluc CLA 2005-12-12 09:37:26 EST
Verified for 3.2 M4 using build I20051212-0010