Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 356694 - [change method signature] adding parameter introduces a compilation error: Cannot reduce the visibility of the inherited method from
Summary: [change method signature] adding parameter introduces a compilation error: Ca...
Status: CLOSED DUPLICATE of bug 58616
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.8   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-04 18:59 EDT by Gustavo Soares CLA
Modified: 2011-09-05 12:53 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gustavo Soares CLA 2011-09-04 18:59:55 EDT
Build Identifier: 20110615-0604

The change method signature refactoring introduce a compilation error while adding a parameter to a method. 

Reproducible: Always

Steps to Reproduce:
1. Create the classes
public class A {
  protected long k() {
    return 0;
  }
}
public class B extends A {
  private long k(long l) {
    return 2;
  }
}
2. Apply the Change Method Signature to add a parameter to k()
public class A {
  protected long k(long l) {
    return 0;
  }
}
public class B extends A {
  private long k(long l) {
    return 2;
  }
}
3. The resulting code does not compile
Comment 1 Markus Keller CLA 2011-09-05 12:53:29 EDT

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