Bug 23329 - search: incorrect range for type references in brackets
Summary: search: incorrect range for type references in brackets
Status: VERIFIED 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.1 M1   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 22938
  Show dependency tree
 
Reported: 2002-09-09 11:26 EDT by Adam Kiezun CLA
Modified: 2002-09-19 06:11 EDT (History)
0 users

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-09-09 11:26:56 EDT
latest 2.1 patch
package p;
class NonnaPapera
{
}
class Paperino extends NonnaPapera
{
}
public class TestRefactor
{
	public static void main(String[] args)
	{
		Paperino paperino = new Paperino();
		NonnaPapera nonnaPapera = ( NonnaPapera )paperino;
	}
}


search for references to class NonnaPapera
the range of the ref found in main is incorrect
Comment 1 Jerome Lanneluc CLA 2002-09-13 06:21:48 EDT
Parser.consumeCastExpressionLL1() was incorrectly setting the positions of the 
type reference to the enclosing brackets (+1 and -1).

Fixed by not changing the positions of the type reference.
Comment 2 Jerome Lanneluc CLA 2002-09-13 06:42:21 EDT
Also fixed Parser.consumePrimaryNoNewArray() to not update the positions of the 
expression.
Comment 3 Jerome Lanneluc CLA 2002-09-13 06:50:52 EDT
Actually the last change (on Parser.consumePrimaryNoNewArray()) breaks the dom 
AST in the parenthesis expressin area. Backing out last change and reopening 
bug.
Comment 4 Jerome Lanneluc CLA 2002-09-13 09:08:02 EDT
Change pushed down to MatchLocatorParser.
Comment 5 David Audel CLA 2002-09-19 06:11:57 EDT
Verified.