| Summary: | [push down] Pushing down a field leads to compilation error: X cannot be resolved or is not a field | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Gustavo Soares <gsoares> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED DUPLICATE | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | deepakazad |
| Version: | 3.7 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
See bug 177636 comment 1 *** This bug has been marked as a duplicate of bug 177636 *** |
Build Identifier: 20100218-1602 Eclipse does not check if a field is being used before refactor it. After the refactoring there is a compilation error because the field cannot be found anymore. Reproducible: Always Steps to Reproduce: 1. Create the classes: public class A { protected int f; } public class B extends A { public long m(){ return super.f; } } 2. Apply the push down refactoring to A.f: public class A { } public class B extends A { protected int f; public long m(){ return super.f; } } 3. The transformation leads to compilation error: f cannot be resolved or is not a field