Bug 33806

Summary: Code assist failure: assignment of double in for loop hides previous variables
Product: [Eclipse Project] JDT Reporter: Jed Anderson <jed.anderson>
Component: CoreAssignee: David Audel <david_audel>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 RC2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Jed Anderson CLA 2003-03-04 15:32:35 EST
Build id: 200302270800

The following code exhibits a code assist failure due to the assignment of the
double variable inside the for loop.  Any attempts I made to reduce the test
case further made code assist work, so I assume that this is nearly the smallest
test case.

On the line after the "/* code assist here */" comment attempt code assist on
"loc", "ba", or "fie" (should return "local", "bar", and "field" respectively).
 All will fail, it appears as though the for loop + double is tripping up the
code completion engine.

public class Test {
	Object field;
	public void foo() {
		Object local= null;
		double bar= 0;
	
		for (;;) {
			bar = (double)1;
		}
		/* code assist here */

	}
}
Comment 1 David Audel CLA 2003-03-05 06:05:49 EST
Fixed.
Comment 2 David Audel CLA 2003-03-10 06:48:59 EST
Verified.