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

Bug 355534

Summary: [quick fix] Quick fix suggest casting to only one type when multiple overloaded functions are present
Product: [Eclipse Project] JDT Reporter: Ankur Sharma <ankur_sharma>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: deepakazad, raksha.vasisht
Version: 3.7   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Ankur Sharma CLA 2011-08-23 12:18:21 EDT
Snippet:

public class Class {
	public void overloadedFunction(Boolean b) {
		
	}
	
	public void overloadedFunction(String str) {
		
	}
	
	public void function(){
		Object i;
		overloadedFunction(i);	//Check the quick fix here
	}
}


The quick fix at overloadedFunction(i) suggests to cast 'i' to Boolean only. It should also provide a quick fix to cast it to String.
Comment 1 Raksha Vasisht CLA 2011-10-24 15:19:27 EDT
(In reply to comment #0)

> 
> The quick fix at overloadedFunction(i) suggests to cast 'i' to Boolean only. It
> should also provide a quick fix to cast it to String.

Yep. It only shows the first one.
Comment 2 Deepak Azad CLA 2011-10-24 19:56:33 EDT

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