Bug 319929 - [push down] Pushing down a field leads to compilation error: X cannot be resolved or is not a field
Summary: [push down] Pushing down a field leads to compilation error: X cannot be reso...
Status: CLOSED DUPLICATE of bug 177636
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.7   Edit
Hardware: PC Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-07-14 18:37 EDT by Gustavo Soares CLA
Modified: 2010-07-18 05:16 EDT (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 Gustavo Soares CLA 2010-07-14 18:37:21 EDT
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
Comment 1 Deepak Azad CLA 2010-07-18 05:16:34 EDT
See bug 177636 comment 1

*** This bug has been marked as a duplicate of bug 177636 ***