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

Bug 366358

Summary: Error message is not very helpful in case of name clashes
Product: [Eclipse Project] JDT Reporter: Sebastian Zarnekow <sebastian.zarnekow>
Component: CoreAssignee: JDT Core Triaged <jdt-core-triaged>
Status: CLOSED WONTFIX QA Contact: Ayushman Jain <amj87.iitr>
Severity: normal    
Priority: P3 CC: amj87.iitr, daniel_megert, srikanth_sankaran
Version: 3.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard: stalebug

Description Sebastian Zarnekow CLA 2011-12-12 03:25:25 EST
Just stumbled accross his one:

Two classes with the same simple name ('String' - it was created for testing purposes) were present and I accidently used the wrong one. Therefore, I got a compiler error that told me something along this line 

'The method doStuff(String) in the type MyClass is not applicable for the arguments (String)'

It would be more helpful if the qualified names were used iff the simple names are equal.
Comment 1 Sebastian Zarnekow CLA 2011-12-12 03:25:55 EST
package sample;

public class MyClass {

	void doStuff(String s) {}
	
	void doStuff() {
		doStuff("");
	}
	
}

===

package sample;

public class String {

}
Comment 2 Ayushman Jain CLA 2011-12-12 08:33:42 EST
Will consider, time permitting.
Comment 3 Eclipse Genie CLA 2020-03-12 15:33:09 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.