Community
Participate
Working Groups
Pushing down a field may cause compilation error. Reproducible: Always Steps to Reproduce: 1. Create classes: package p1; public class A { protected int f = 11; } package p0; import p1.*; public class B extends A{ protected int f = 10; } package p0; public class C extends B { public long m() { return new B().f; } } 2. Apply the push down field refactoring (push down the field f from B to C) package p1; public class A { protected int f = 11; } package p0; import p1.*; public class B extends A{ } package p0; public class C extends B { protected int f = 10; public long m() { return new B().f; } } 3. After the refactoring, resulting program does not compile.
*** This bug has been marked as a duplicate of bug 177636 ***