Bug 123225 - Code assist suggests overridden method
Summary: Code assist suggests overridden method
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.3 M3   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-10 05:57 EST by Martin Aeschlimann CLA
Modified: 2006-10-30 11:56 EST (History)
0 users

See Also:


Attachments
Proposed fix (13.46 KB, patch)
2006-09-25 04:13 EDT, David Audel 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 2006-01-10 05:57:04 EST
20060110

The example in bug 111350 shows that NumericArray:add overrides Array:add

- Do a code assist in A, you get 2 proposals add(Integer), add(Number)
- I think only add(Number) should be shown. add(Integer) is not available here


package p;

public class A {
	public static void main(String[] args) {
		new NumericArray<Integer>().|code assist
	}
}

class Array<T> {
	public void add(T t){
		System.out.println("Array<T>:add");
	}
}

class NumericArray<T extends Number> extends Array<T> {
	@Override
	public void add(Number n){
		System.out.println("NumericArray<T>:add");
	}
}
Comment 1 David Audel CLA 2006-09-25 04:13:54 EDT
Created attachment 50786 [details]
Proposed fix
Comment 2 David Audel CLA 2006-09-25 04:19:37 EDT
Released for 3.3 M3.

Tests added
  CompletionTests_1_5#test0291() -> test0293()
Comment 3 Frederic Fusier CLA 2006-10-30 11:56:30 EST
Verified for 3.3 M3 using warm-up build I20061030-0010.