Bug 391715

Summary: [Rename method] Strong precondition: the reference 'k' will be shadowed by a rename declaration
Product: [Eclipse Project] JDT Reporter: Gustavo Soares <gsoares>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: NEW --- QA Contact:
Severity: enhancement    
Priority: P3    
Version: 4.3   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X   
Whiteboard:

Description Gustavo Soares CLA 2012-10-11 15:40:09 EDT
1o. step: Create the classes:

public class A {
	
	public long k(long a) {
		return 10;
	}
	
	
}

public class B extends A {

	public long n(int a) {
		return 20;
	}
	
	public long test() {
		return k(2);
	}
	
}

Apply the rename method to rename n to k. Eclipse will show the warning: the reference k will be shadowed by a renamed declaration. It would be nice if Eclipse  suggests an additional change to perform the transformation: 

public class A {
	
	public long k(long a) {
		return 10;
	}
	
	
}

public class B extends A {

	public long k(int a) {
		return 20;
	}
	
	public long test() {
		return super.k(2);
	}
	
}