Bug 6429

Summary: declaration source start incorrect on local variable
Product: [Eclipse Project] JDT Reporter: Adam Kiezun <akiezun>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: dirk_baeumer
Version: 2.0   
Target Milestone: 2.0 M2   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Adam Kiezun CLA 2001-11-29 11:15:59 EST
package p;
class A{
	int i(){
		int[] a= new int[6];
		int /**/i= a[9];
		return i;
	}
}

when i ask for the declarationSourceStart and declarationSourceEnd 
of the i temp and the look a source in that range i get:
/**/i= a[9]

the type is not included.
however, when you change the type declaration to:
int i= a[9];
everything is fine, i.e. the source is: int i= a[9]
Comment 1 Olivier Thomann CLA 2001-11-30 10:53:21 EST
This bug is a side-effect of the bug in checkAnnotation() of the parser class. I 
guess I can fix it if I consider that a local variable is never concerned by 
javadoc comments preceeding the declaration.
In your test case if you remove the comment, you will get the right positions.
Comment 2 Olivier Thomann CLA 2001-12-13 12:30:02 EST
Fix released in HEAD. Change in the Parse::checkAnnotation()