| Summary: | [Add parameter] Strong precondition: The method [] from the type [] is not visible | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Gustavo Soares <gsoares> |
| Component: | UI | Assignee: | JDT-UI-Inbox <jdt-ui-inbox> |
| Status: | CLOSED WONTFIX | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | noopur_gupta |
| Version: | 4.2 | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Mac OS X | ||
| Whiteboard: | stalebug | ||
Tested with Build ID: I20130204-1400. The bug is reproducible. This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie. |
Step 1: Create the classes: package p1; public class A{ long k(){ return 58; } public long m(){ return new C().k(); } } package p2; import p1.*; public class B extends A { } package p1; import p2.*; public class C extends B { public long k(){return 24;} } Step 2: apply the change method signature to add a parameter "int i" to the method A.k. Eclipse will show a warning: the method k(int) from type A is not visible. However, if we apply the transformation regardless the warning, the resulting program will compile: package p1; public class A{ long k(int i){ return 58; } public long m(){ return new C().k(0); } } package p2; import p1.*; public class B extends A { } package p1; import p2.*; public class C extends B { public long k(int i){return 24;} }