Bug 10781

Summary: ast: incorrect position and length for AnonymousClassDeclaration
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 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

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. ***