Summary: | Refactor > Rename renames local variable instead of member in case of name clash | ||
---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Lars Pedersen <lp> |
Component: | Core | Assignee: | Jerome Lanneluc <jerome_lanneluc> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | normal | ||
Priority: | P2 | ||
Version: | 1.0 | ||
Target Milestone: | 2.0 M1 | ||
Hardware: | PC | ||
OS: | Linux | ||
Whiteboard: |
Description
Lars Pedersen
2001-11-12 18:43:54 EST
With latest (2.0 stream) I am obtaining the following which is still wrong: public class EclipseTest { public int test1 = 0; public static void main(String[] args) { EclipseTest test = new EclipseTest(); test1.test1 = 1; } } This is a search bug. It finds 2 matches for 'test' in 'test.test', the first one being an inaccurate match. It should not be a match at all. Internally there were 2 problems: - first we transformed the local variable binding into null, which caused us to report an inaccurate match - second the 2 algorithms that compute the source positions of references were mixed up together Fixed the first problem by checking if the binding of the first token was not a local variable binding. Fixed the second problem by separating the 2 algorithms. |