Bug 8452 - Wrong position in FieldReference
Summary: Wrong position in FieldReference
Status: RESOLVED WORKSFORME
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.1 RC1   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-01-25 05:49 EST by Dirk Baeumer CLA
Modified: 2003-02-14 09:52 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 Dirk Baeumer CLA 2002-01-25 05:49:18 EST
Build 20020123

Consider the following source code:

class A {
	void f() {
		int f= new A[1+2].length;
	}
}

The source start,end of the field reference to initialize the int f is [44,49] 
which covers the word length. Since the field reference contains the array 
allocation expression (position [33,42]) the source start, end of the field 
reference should be [32, 49].
Comment 1 Philipe Mulet CLA 2002-01-25 07:13:47 EST
Agreed, but then we would need to use the sourceEnd of the field reference for 
codegen positions.

Deferring

Comment 2 Dirk Baeumer CLA 2002-01-25 08:25:48 EST
But it will be fixed in the new AST ?
Comment 3 Olivier Thomann CLA 2002-01-25 10:46:29 EST
This problem will be fixed in new AST. I am working on it.
Comment 4 Olivier Thomann CLA 2002-01-25 11:02:38 EST
This is fixed in the new AST. Please continue to send me all the cases we think 
that they could lead to some position issues. The more I have, the more 
stable the new AST implementation will be.
See ASTConverterTest.test0167.
Thanks for the report.
Comment 5 Philipe Mulet CLA 2003-02-14 09:35:16 EST
Is this still an issue ?
Comment 6 Dirk Baeumer CLA 2003-02-14 09:39:52 EST
Don't think so since regarding to Olivier the original problem got fixed.
Comment 7 Philipe Mulet CLA 2003-02-14 09:52:17 EST
Given you only use the new AST now... closing
Comment 8 Philipe Mulet CLA 2003-02-14 09:52:42 EST
Closing