Bug 6433 - declaration source start incorrect on local variable #2
Summary: declaration source start incorrect on local variable #2
Status: RESOLVED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.0 M2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 6413 6414
  Show dependency tree
 
Reported: 2001-11-29 11:54 EST by Adam Kiezun CLA
Modified: 2002-01-14 11:48 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Kiezun CLA 2001-11-29 11:54:47 EST
package p;
class A{
	int i(){
		if (false){
			//
		}
		i();
		int i= 0;
		return i;
	}
}
the ast says that declaration of the i temp includes 
the comment and the closing bracket from the if statement before!
plus the message send i();
Comment 1 Olivier Thomann CLA 2001-11-30 10:53:31 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:17 EST
Fix released in HEAD. Change in the Parse::checkAnnotation()