Community
Participate
Working Groups
Build Identifier: 20110615-0604 Pulling up a field disables field hiding changing program behavior. Reproducible: Always Steps to Reproduce: 1. Create the classes public class A { } public class B extends A { public int k = 1; } public class C extends B { public int k = 2; public long test() { return k; } } 2. The test method returns 2. Apply the pull up field to B.k: public class A { public int k = 1; } public class B extends A { } public class C extends B { public long test() { return k; } } 3. After the transformation, the test method returns 1
(In reply to comment #0) > 2. The test method returns 2. Apply the pull up field to B.k: > public class A { > public int k = 1; > } > public class B extends A { > } > public class C extends B { > public long test() { > return k; > } > } Should not remove C.k. Happens with 3.8 build I20111021-0800 on win7.
*** Bug 471951 has been marked as a duplicate of this bug. ***
New Gerrit change created: https://git.eclipse.org/r/149285
Gerrit change https://git.eclipse.org/r/149285 was merged to [master]. Commit: http://git.eclipse.org/c/jdt/eclipse.jdt.ui.git/commit/?id=2cc97af8e2df9241efdf5220325e2f1663e50314
Verified with eclipse-SDK-I20191101-0300-win32-x86_64
Thanks Kenneth for testing. In the future, make sure to do this with an I-build during the quiet week, and set the status to VERIFIED (FIXED) afterwards. Verified for 4.14 M3 using I20191120-0840 build.