| Summary: | "Use supertype" blocks with inherited methods [refactoring] | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Friedrich Steimann <steimann> | ||||
| Component: | UI | Assignee: | Tobias Widmer <tobias_widmer> | ||||
| Status: | RESOLVED WONTFIX | QA Contact: | |||||
| Severity: | normal | ||||||
| Priority: | P3 | CC: | dirk_baeumer | ||||
| Version: | 3.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 2000 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
Created attachment 13090 [details]
Sample project reproducing the problem
Tobias, can you please check the state of this bug (since you recoded use supertype). |
Version: 3.0.0 Build id: 200407090010 "Use Supertype" does not replace var's type by interface with identical protocol if class inherits a method from a superclass. public class A { public void m(){ } } public interface I { void m(); void n(); } public class B extends A implements I { public void n() { } public void doIt() { B b = new B(); b.m(); b.n(); } } Refuses to replace B with I. Works if m() is overridden in B. Is this a feature? -- Friedrich