| Summary: | Renaming field introduces compilation error | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Melina Mongiovi <melmongiovi> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | ||
| Version: | 4.5 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | stalebug | ||
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Reproducing the bug: Consider the following program: package p; public class A { static int f= 0; void m(){ p.A.f= 0; /**/ } } Now, let's rename field f to g by not updating references Resulting program: package p; public class A { static int g= 0; void m(){ p.A.f= 0; /**/ } } After the refactoring, the resulting program does not compile. I understand that the resulting program does not compile because I did not activate the "update reference" parameter to apply this transformation. However, a correct refactoring transformation cannot introduces compilation erros. Therefore, Eclipse should reject this kind of transformation regardless the configuration settings, or at least, warn a message to the user to report this problem before applying the transformation.