Bug 175834

Summary: [assist] already defined name is proposed as variable name
Product: [Eclipse Project] JDT Reporter: David Audel <david_audel>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.3   
Target Milestone: 3.3 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix none

Description David Audel CLA 2007-02-28 09:20:08 EST
build I20070222-0951

1) create Test.java
package test;
public class Test {
	void bar() {
		/**/int varzz| // complete at |
		{
			int varzz1 = 0;
			varzz1 = 0;
		}
		int varzz2 = 0;
		#
	}
}

2) Do ctrl + space at |

varzz1 is proposed and shouldn't.
Comment 1 David Audel CLA 2007-02-28 09:29:52 EST
Created attachment 59976 [details]
Proposed fix

CompletionParser#parseStatementsAfterCompletion() must start in recovery mode to not loose some correct nodes.
Comment 2 David Audel CLA 2007-02-28 09:34:46 EST
Released for 3.3M6.

Test added
  CompletionTests#testCompletionVariableName36()
Comment 3 Maxime Daniel CLA 2007-03-20 08:04:50 EDT
Verified for 3.3 M6 using build I20070320-0010.