Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 355329

Summary: [move method] super method invocation does not compile after refactoring
Product: [Eclipse Project] JDT Reporter: Gustavo Soares <gsoares>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r
Version: 3.6.1   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Gustavo Soares CLA 2011-08-21 18:37:10 EDT
Build Identifier: 20110615-0604

Applying the move method refactoring to a method leads to a compilation error: The method  is undefined for the type

Reproducible: Always

Steps to Reproduce:
1. Create the classes:
public class A {
  public B b;
  public long m() {
    return 0;
  }
}
public class B extends A {
  public long test() {
    return super.m();
  }
}
2. Apply the move method refactoring to m(). 
public class A {
  public B b;
}
class B extends A {
  public long test() {
    return super.m();
  }
  public long m() {
    return 0;
  }
}
3. The resulting program does not compile: The method m() is undefined for the type A
Comment 1 Markus Keller CLA 2011-09-05 12:43:25 EDT

*** This bug has been marked as a duplicate of bug 356687 ***