View | Details | Raw Unified | Return to bug 202830
Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java (-1 / +4 lines)
Lines 270-276 Link Here
270
void checkInheritedMethods(MethodBinding inheritedMethod, MethodBinding otherInheritedMethod) {
270
void checkInheritedMethods(MethodBinding inheritedMethod, MethodBinding otherInheritedMethod) {
271
	// sent from checkMethods() to compare 2 inherited methods that are not 'equal'
271
	// sent from checkMethods() to compare 2 inherited methods that are not 'equal'
272
	if (inheritedMethod.declaringClass.erasure() == otherInheritedMethod.declaringClass.erasure()) {
272
	if (inheritedMethod.declaringClass.erasure() == otherInheritedMethod.declaringClass.erasure()) {
273
		if (inheritedMethod.areParameterErasuresEqual(otherInheritedMethod)) {
273
		boolean areDuplicates = inheritedMethod.hasSubstitutedParameters() && otherInheritedMethod.hasSubstitutedParameters()
274
			? inheritedMethod.areParametersEqual(otherInheritedMethod)
275
			: inheritedMethod.areParameterErasuresEqual(otherInheritedMethod);
276
		if (areDuplicates) {
274
			problemReporter().duplicateInheritedMethods(this.type, inheritedMethod, otherInheritedMethod);
277
			problemReporter().duplicateInheritedMethods(this.type, inheritedMethod, otherInheritedMethod);
275
			return;
278
			return;
276
		}
279
		}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java (+14 lines)
Lines 7228-7233 Link Here
7228
		"----------\n"
7228
		"----------\n"
7229
	);
7229
	);
7230
}
7230
}
7231
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=202830
7232
public void test120a() {
7233
	this.runConformTest(
7234
		new String[] {
7235
			"Bar.java",
7236
			"class Foo<V, E> {\n" + 
7237
			"	int getThing(V v) { return 1; }\n" + 
7238
			"	boolean getThing(E e) { return true; }\n" +
7239
			"}\n" +
7240
			"public class Bar<V,E> extends Foo<V,E> {}"
7241
		},
7242
		""
7243
	);
7244
}
7231
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=173477
7245
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=173477
7232
public void test121() {
7246
public void test121() {
7233
	this.runConformTest(
7247
	this.runConformTest(

Return to bug 202830