| Summary: | [rename] Renaming method leads to compilation error due to reduce visibility of inherited method | ||
|---|---|---|---|
| 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: | daniel_megert |
| Version: | 3.6 | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
*** This bug has been marked as a duplicate of bug 233712 *** |
Build Identifier: 20090920-1017 Renaming a method leads to reduce the visibility of an inherited method, which is not allowed in Java. Reproducible: Always Steps to Reproduce: 1. Create the classes public class A { public void k() {} } public class B extends A{ private void n() {} } 2. Apply the rename method refactoring to n renaming it to k public class A { public void k() {} } public class B extends A{ private void k() {} } 3. The resulting code doesn't compile. Error: cannot reduce the visibility of inherited method.