Bug 80739

Summary: [1.5] Two methods ends up with the same signatures
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Kent Johnson <kent_johnson>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r
Version: 3.1   
Target Milestone: 3.1 M4   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Olivier Thomann CLA 2004-12-10 17:27:47 EST
Using latest, that code compiles fine, but it should fail because two methods
are inherited with the same signature.

class A<T> {
    void foo(T t) {}
    void foo(String i) {}
}

public class X<T> extends A<String> {}

If you change it for:
class A<T> {
    void foo(T t) {}
    void foo(String i) {}
}

public class X<T> extends A<String> {
	public static void main(String[] args) {
		new X<String>().foo("");
	}
}

We do report an ambiguous call.
----------
1. ERROR in C:\tests_sources\X.java (at line 8)
	new X<String>().foo("");
	                ^^^
The method foo(String) is ambiguous for the type X<String>
----------
1 problem (1 error)
Comment 1 Kent Johnson CLA 2004-12-13 11:47:15 EST
*** Bug 80028 has been marked as a duplicate of this bug. ***
Comment 2 Kent Johnson CLA 2004-12-14 13:12:15 EST
Added MethodVerify test023
Comment 3 Kent Johnson CLA 2004-12-15 15:21:35 EST
fixed.
Comment 4 Olivier Thomann CLA 2004-12-15 20:31:06 EST
Verified in 200412160010