Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 406928
Collapse All | Expand All

(-)a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java (+29 lines)
Lines 13911-13914 public void testBug384580() { Link Here
13911
		"Name clash: The method m() of type Foo has the same erasure as m() of type Y but does not override it\n" + 
13911
		"Name clash: The method m() of type Foo has the same erasure as m() of type Y but does not override it\n" + 
13912
		"----------\n");
13912
		"----------\n");
13913
}
13913
}
13914
13915
13916
public void test406928() {
13917
	Map compilerOptions16 = getCompilerOptions();
13918
	compilerOptions16.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, CompilerOptions.VERSION_1_6);
13919
	compilerOptions16.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_6);
13920
	compilerOptions16.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_6);
13921
	this.runConformTest(
13922
		new String[] {
13923
			"TestPointcut.java",
13924
			"interface MethodMatcher {\n"+
13925
			"	boolean matches();\n"+
13926
			"}\n"+
13927
			"abstract class StaticMethodMatcher implements MethodMatcher { }\n"+
13928
			"abstract class StaticMethodMatcherPointcut extends StaticMethodMatcher { }\n"+
13929
			"\n"+
13930
			"class TestPointcut extends StaticMethodMatcherPointcut {\n"+
13931
			"	@Override\n"+
13932
			"	public boolean matches() { return false; } \n"+
13933
			"}\n"
13934
		},
13935
		"",
13936
		null,
13937
		true,
13938
		null,
13939
		compilerOptions16,
13940
		null);
13941
}
13942
13914
}
13943
}
(-)a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier.java (-2 / +13 lines)
Lines 577-585 void computeInheritedMethods(ReferenceBinding superclass, ReferenceBinding[] sup Link Here
577
577
578
	List superIfcList = new ArrayList();
578
	List superIfcList = new ArrayList();
579
	HashSet seenTypes = new HashSet();
579
	HashSet seenTypes = new HashSet();
580
	collectAllDistinctSuperInterfaces(superclass, seenTypes, superIfcList);
580
	collectAllDistinctSuperInterfaces(superInterfaces, seenTypes, superIfcList);
581
	collectAllDistinctSuperInterfaces(superInterfaces, seenTypes, superIfcList);
581
	if (superclass != null)
582
		collectAllDistinctSuperInterfaces(superclass.superInterfaces(), seenTypes, superIfcList);
583
	if (superIfcList.size() == 0) return;
582
	if (superIfcList.size() == 0) return;
584
	
583
	
585
	if (superIfcList.size() == 1) {
584
	if (superIfcList.size() == 1) {
Lines 620-625 void computeInheritedMethods(ReferenceBinding superclass, ReferenceBinding[] sup Link Here
620
	}
619
	}
621
}
620
}
622
621
622
void collectAllDistinctSuperInterfaces(ReferenceBinding superType, Set seen, List result) {
623
	// use 'seen' to avoid duplicates, use result to maintain stable order
624
	if (superType == null) {
625
		return;
626
	}
627
	collectAllDistinctSuperInterfaces(superType.superInterfaces(), seen, result);
628
	ReferenceBinding superSuperType = superType.superclass();
629
	if (superSuperType != null) {
630
		collectAllDistinctSuperInterfaces(superSuperType, seen, result);
631
	}
632
}
633
623
void collectAllDistinctSuperInterfaces(ReferenceBinding[] superInterfaces, Set seen, List result) {
634
void collectAllDistinctSuperInterfaces(ReferenceBinding[] superInterfaces, Set seen, List result) {
624
	// use 'seen' to avoid duplicates, use result to maintain stable order
635
	// use 'seen' to avoid duplicates, use result to maintain stable order
625
	int length = superInterfaces.length;
636
	int length = superInterfaces.length;

Return to bug 406928