Bug 10781 - ast: incorrect position and length for AnonymousClassDeclaration
Summary: ast: incorrect position and length for AnonymousClassDeclaration
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 M4   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 10933 (view as bug list)
Depends on:
Blocks:
 
Reported: 2002-03-05 11:04 EST by Adam Kiezun CLA
Modified: 2002-03-07 11:49 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 2002-03-05 11:04:38 EST
package p;

class A1 {
	int x;
}
class B1 extends A1 {
	public void m() { 
		new B1(){
		};
	}
}

the AnonymousClassDeclaration node has 
length == 0
startPosition == -1
Comment 1 Olivier Thomann CLA 2002-03-05 11:27:17 EST
Which positions do you expect in this case?
The block of the anonymous declaration.
Start = 
position of the '{'?
End = position of the '}'?
Comment 2 Adam Kiezun CLA 2002-03-05 11:31:46 EST
yes, i think this'll do
Comment 3 Olivier Thomann CLA 2002-03-06 11:01:18 EST
Fixed and released in HEAD.
Comment 4 Olivier Thomann CLA 2002-03-07 11:49:54 EST
*** Bug 10933 has been marked as a duplicate of this bug. ***