Bug 223899 - Base type var should not be proposed before Object var in == case
Summary: Base type var should not be proposed before Object var in == case
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.4 M7   Edit
Assignee: David Audel CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-03-25 12:58 EDT by Jerome Lanneluc CLA
Modified: 2008-04-29 05:38 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix (4.38 KB, patch)
2008-04-04 05:12 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 Jerome Lanneluc CLA 2008-03-25 12:58:18 EDT
I20080325-0100

If you complete after zz in the following cu, zzvar1 is proposed before zzvar2. There is no chance that zzvar1 would be compared to a since it is of a base type.

package p;
public class Test {
	void foo(Object a) {
		int zzvar1 = 1;
		Object zzvar2 = null;
		int zzvar3 = 0;
		if (a == zz//complete here
Comment 1 David Audel CLA 2008-04-04 05:12:49 EDT
Created attachment 94824 [details]
Proposed fix
Comment 2 David Audel CLA 2008-04-04 05:14:53 EDT
Released for 3.4M7.

Test added
  CompletionTests#testCompletionAfterEqualEqual2()
Comment 3 Eric Jodet CLA 2008-04-29 05:38:26 EDT
Verified for 3.4M7 using I20080427-2000.