View | Details | Raw Unified | Return to bug 345949 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/core/compiler/IProblem.java (+2 lines)
Lines 1155-1160 Link Here
1155
1155
1156
	/** @since 3.7 */
1156
	/** @since 3.7 */
1157
	int DuplicateInheritedMethods = MethodRelated + 583;
1157
	int DuplicateInheritedMethods = MethodRelated + 583;
1158
	/** @since 3.7 */
1159
	int MethodNameClashHidden = MethodRelated + 584;
1158
	
1160
	
1159
	/**
1161
	/**
1160
	 * 1.5 Syntax errors (when source level < 1.5)
1162
	 * 1.5 Syntax errors (when source level < 1.5)
(-)compiler/org/eclipse/jdt/internal/compiler/lookup/MethodVerifier15.java (-1 / +7 lines)
Lines 235-241 Link Here
235
	//		class A implements I<Integer> { public void test(Integer i) {} }
235
	//		class A implements I<Integer> { public void test(Integer i) {} }
236
	//		class B extends A { public void test(Comparable i) {} }
236
	//		class B extends A { public void test(Comparable i) {} }
237
237
238
	if (inheritedMethod.isStatic()) return;
238
	if (inheritedMethod.isStatic() || currentMethod.isStatic()) {
239
		MethodBinding original = inheritedMethod.original(); // can be the same as inherited
240
		if (this.type.scope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_7 && currentMethod.areParameterErasuresEqual(original)) {
241
			problemReporter(currentMethod).methodNameClashHidden(currentMethod, inheritedMethod.declaringClass.isRawType() ? inheritedMethod : original);
242
		}
243
		return; // no chance of bridge method's clashing
244
	}
239
245
240
	if (!detectNameClash(currentMethod, inheritedMethod, false)) { // check up the hierarchy for skipped inherited methods
246
	if (!detectNameClash(currentMethod, inheritedMethod, false)) { // check up the hierarchy for skipped inherited methods
241
		TypeBinding[] currentParams = currentMethod.parameters;
247
		TypeBinding[] currentParams = currentMethod.parameters;
(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (+21 lines)
Lines 5081-5086 Link Here
5081
		currentMethod.sourceEnd());
5081
		currentMethod.sourceEnd());
5082
}
5082
}
5083
5083
5084
public void methodNameClashHidden(MethodBinding currentMethod, MethodBinding inheritedMethod) {
5085
	this.handle(
5086
		IProblem.MethodNameClashHidden,
5087
		new String[] {
5088
			new String(currentMethod.selector),
5089
			typesAsString(currentMethod.isVarargs(), currentMethod.parameters, false),
5090
			new String(currentMethod.declaringClass.readableName()),
5091
			typesAsString(inheritedMethod.isVarargs(), inheritedMethod.parameters, false),
5092
			new String(inheritedMethod.declaringClass.readableName()),
5093
		 },
5094
		new String[] {
5095
			new String(currentMethod.selector),
5096
			typesAsString(currentMethod.isVarargs(), currentMethod.parameters, true),
5097
			new String(currentMethod.declaringClass.shortReadableName()),
5098
			typesAsString(inheritedMethod.isVarargs(), inheritedMethod.parameters, true),
5099
			new String(inheritedMethod.declaringClass.shortReadableName()),
5100
		 },
5101
		currentMethod.sourceStart(),
5102
		currentMethod.sourceEnd());
5103
}
5104
5084
public void methodNeedBody(AbstractMethodDeclaration methodDecl) {
5105
public void methodNeedBody(AbstractMethodDeclaration methodDecl) {
5085
	this.handle(
5106
	this.handle(
5086
		IProblem.MethodRequiresBody,
5107
		IProblem.MethodRequiresBody,
(-)compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties (+1 lines)
Lines 521-526 Link Here
521
578 = Wildcard is not allowed at this location
521
578 = Wildcard is not allowed at this location
522
579 = Unused type arguments for the non generic method {0}({1}) of type {2}; it should not be parameterized with arguments <{3}>
522
579 = Unused type arguments for the non generic method {0}({1}) of type {2}; it should not be parameterized with arguments <{3}>
523
583 = Duplicate methods named {0} with the parameters ({1}) and ({2}) are inherited from the types {3} and {4}
523
583 = Duplicate methods named {0} with the parameters ({1}) and ({2}) are inherited from the types {3} and {4}
524
584 = Name clash: The method {0}({1}) of type {2} has the same erasure as {0}({3}) of type {4} but does not hide it
524
525
525
### FOREACH
526
### FOREACH
526
580 = Type mismatch: cannot convert from element type {0} to {1}
527
580 = Type mismatch: cannot convert from element type {0} to {1}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java (-1 / +10 lines)
Lines 12-17 Link Here
12
12
13
import java.util.Map;
13
import java.util.Map;
14
14
15
import org.eclipse.jdt.internal.compiler.classfmt.ClassFileConstants;
15
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
16
import org.eclipse.jdt.internal.compiler.impl.CompilerOptions;
16
17
17
import junit.framework.*;
18
import junit.framework.*;
Lines 19-25 Link Here
19
public class AmbiguousMethodTest extends AbstractComparableTest {
20
public class AmbiguousMethodTest extends AbstractComparableTest {
20
21
21
	static {
22
	static {
22
//		TESTS_NAMES = new String [] { "test087" };
23
//		TESTS_NAMES = new String [] { "test018" };
23
	}
24
	}
24
	public AmbiguousMethodTest(String name) {
25
	public AmbiguousMethodTest(String name) {
25
		super(name);
26
		super(name);
Lines 1491-1496 Link Here
1491
	}
1492
	}
1492
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=147647
1493
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=147647
1493
	public void test018() {
1494
	public void test018() {
1495
	if (this.complianceLevel >= ClassFileConstants.JDK1_7)
1496
		return;
1494
	this.runConformTest(
1497
	this.runConformTest(
1495
		new String[] {
1498
		new String[] {
1496
			"Y.java",
1499
			"Y.java",
Lines 1516-1521 Link Here
1516
	// in fact, <W extends String> Y<W> make(Class<W> clazz) is the most
1519
	// in fact, <W extends String> Y<W> make(Class<W> clazz) is the most
1517
	// specific method according to JLS 15.12.2.5
1520
	// specific method according to JLS 15.12.2.5
1518
	public void test019() {
1521
	public void test019() {
1522
	if (this.complianceLevel >= ClassFileConstants.JDK1_7)
1523
			return;
1519
	this.runConformTest(
1524
	this.runConformTest(
1520
		new String[] {
1525
		new String[] {
1521
			"Y.java",
1526
			"Y.java",
Lines 1542-1547 Link Here
1542
	}
1547
	}
1543
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=147647
1548
	// https://bugs.eclipse.org/bugs/show_bug.cgi?id=147647
1544
	public void test020() {
1549
	public void test020() {
1550
	if (this.complianceLevel >= ClassFileConstants.JDK1_7)
1551
		return;
1545
	this.runConformTest(
1552
	this.runConformTest(
1546
		new String[] {
1553
		new String[] {
1547
			"Y.java",
1554
			"Y.java",
Lines 2512-2517 Link Here
2512
}
2519
}
2513
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=184190
2520
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=184190
2514
public void test056() {
2521
public void test056() {
2522
	if (this.complianceLevel >= ClassFileConstants.JDK1_7)
2523
		return;
2515
	this.runConformTest(
2524
	this.runConformTest(
2516
		new String[] {
2525
		new String[] {
2517
			"X.java",
2526
			"X.java",
(-)src/org/eclipse/jdt/core/tests/compiler/regression/CompilerInvocationTests.java (+2 lines)
Lines 681-686 Link Here
681
		expectedProblemAttributes.put("MethodMustOverride", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
681
		expectedProblemAttributes.put("MethodMustOverride", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
682
		expectedProblemAttributes.put("MethodMustOverrideOrImplement", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
682
		expectedProblemAttributes.put("MethodMustOverrideOrImplement", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
683
		expectedProblemAttributes.put("MethodNameClash", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
683
		expectedProblemAttributes.put("MethodNameClash", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
684
		expectedProblemAttributes.put("MethodNameClashHidden", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
684
		expectedProblemAttributes.put("MethodReducesVisibility", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
685
		expectedProblemAttributes.put("MethodReducesVisibility", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
685
		expectedProblemAttributes.put("MethodRequiresBody", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
686
		expectedProblemAttributes.put("MethodRequiresBody", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
686
		expectedProblemAttributes.put("MethodReturnsVoid", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
687
		expectedProblemAttributes.put("MethodReturnsVoid", new ProblemAttributes(CategorizedProblem.CAT_MEMBER));
Lines 1344-1349 Link Here
1344
		expectedProblemAttributes.put("MethodMustOverride", SKIP);
1345
		expectedProblemAttributes.put("MethodMustOverride", SKIP);
1345
		expectedProblemAttributes.put("MethodMustOverrideOrImplement", SKIP);
1346
		expectedProblemAttributes.put("MethodMustOverrideOrImplement", SKIP);
1346
		expectedProblemAttributes.put("MethodNameClash", SKIP);
1347
		expectedProblemAttributes.put("MethodNameClash", SKIP);
1348
		expectedProblemAttributes.put("MethodNameClashHidden", SKIP);
1347
		expectedProblemAttributes.put("MethodReducesVisibility", SKIP);
1349
		expectedProblemAttributes.put("MethodReducesVisibility", SKIP);
1348
		expectedProblemAttributes.put("MethodRequiresBody", SKIP);
1350
		expectedProblemAttributes.put("MethodRequiresBody", SKIP);
1349
		expectedProblemAttributes.put("MethodReturnsVoid", SKIP);
1351
		expectedProblemAttributes.put("MethodReturnsVoid", SKIP);
(-)src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java (-37 / +144 lines)
Lines 27-33 Link Here
27
27
28
public class MethodVerifyTest extends AbstractComparableTest {
28
public class MethodVerifyTest extends AbstractComparableTest {
29
	static {
29
	static {
30
//		TESTS_NAMES = new String[] { "test339447" };
30
//		TESTS_NAMES = new String[] { "test345949c" };
31
//		TESTS_NUMBERS = new int[] { 213 };
31
//		TESTS_NUMBERS = new int[] { 213 };
32
//		TESTS_RANGE = new int[] { 190, -1};
32
//		TESTS_RANGE = new int[] { 190, -1};
33
	}
33
	}
Lines 6055-6060 Link Here
6055
				"	@Override void instanceCase2(Collection c) {}\n" +
6055
				"	@Override void instanceCase2(Collection c) {}\n" +
6056
				"}"
6056
				"}"
6057
			},
6057
			},
6058
			this.complianceLevel < ClassFileConstants.JDK1_7 ?
6059
			"----------\n" + 
6060
			"1. WARNING in Parent.java (at line 3)\n" + 
6061
			"	static void staticCase1(Collection c) {}\n" + 
6062
			"	                        ^^^^^^^^^^\n" + 
6063
			"Collection is a raw type. References to generic type Collection<E> should be parameterized\n" + 
6064
			"----------\n" + 
6065
			"2. WARNING in Parent.java (at line 5)\n" + 
6066
			"	void instanceCase1(Collection c) {}\n" + 
6067
			"	                   ^^^^^^^^^^\n" + 
6068
			"Collection is a raw type. References to generic type Collection<E> should be parameterized\n" + 
6069
			"----------\n" + 
6070
			"3. WARNING in Parent.java (at line 10)\n" + 
6071
			"	static void staticCase2(Collection c) {}\n" + 
6072
			"	                        ^^^^^^^^^^\n" + 
6073
			"Collection is a raw type. References to generic type Collection<E> should be parameterized\n" + 
6074
			"----------\n" + 
6075
			"4. ERROR in Parent.java (at line 11)\n" + 
6076
			"	void instanceCase1(Collection<String> c) {}\n" + 
6077
			"	     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
6078
			"Name clash: The method instanceCase1(Collection<String>) of type Child has the same erasure as instanceCase1(Collection) of type Parent but does not override it\n" + 
6079
			"----------\n" + 
6080
			"5. WARNING in Parent.java (at line 12)\n" + 
6081
			"	@Override void instanceCase2(Collection c) {}\n" + 
6082
			"	                             ^^^^^^^^^^\n" + 
6083
			"Collection is a raw type. References to generic type Collection<E> should be parameterized\n" + 
6084
			"----------\n":
6058
			"----------\n" +
6085
			"----------\n" +
6059
			"1. WARNING in Parent.java (at line 3)\n" +
6086
			"1. WARNING in Parent.java (at line 3)\n" +
6060
			"	static void staticCase1(Collection c) {}\n" +
6087
			"	static void staticCase1(Collection c) {}\n" +
Lines 6066-6086 Link Here
6066
			"	                   ^^^^^^^^^^\n" +
6093
			"	                   ^^^^^^^^^^\n" +
6067
			"Collection is a raw type. References to generic type Collection<E> should be parameterized\n" +
6094
			"Collection is a raw type. References to generic type Collection<E> should be parameterized\n" +
6068
			"----------\n" +
6095
			"----------\n" +
6069
			"3. WARNING in Parent.java (at line 10)\n" +
6096
			"3. ERROR in Parent.java (at line 9)\n" + 
6097
			"	static void staticCase1(Collection<String> c) {}\n" + 
6098
			"	            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + 
6099
			"Name clash: The method staticCase1(Collection<String>) of type Child has the same erasure as staticCase1(Collection) of type Parent but does not hide it\n" + 
6100
			"----------\n" +
6101
			"4. WARNING in Parent.java (at line 10)\n" +
6070
			"	static void staticCase2(Collection c) {}\n" +
6102
			"	static void staticCase2(Collection c) {}\n" +
6071
			"	                        ^^^^^^^^^^\n" +
6103
			"	                        ^^^^^^^^^^\n" +
6072
			"Collection is a raw type. References to generic type Collection<E> should be parameterized\n" +
6104
			"Collection is a raw type. References to generic type Collection<E> should be parameterized\n" +
6073
			"----------\n" +
6105
			"----------\n" +
6074
			"4. ERROR in Parent.java (at line 11)\n" +
6106
			"5. ERROR in Parent.java (at line 11)\n" +
6075
			"	void instanceCase1(Collection<String> c) {}\n" +
6107
			"	void instanceCase1(Collection<String> c) {}\n" +
6076
			"	     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
6108
			"	     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" +
6077
			"Name clash: The method instanceCase1(Collection<String>) of type Child has the same erasure as instanceCase1(Collection) of type Parent but does not override it\n" +
6109
			"Name clash: The method instanceCase1(Collection<String>) of type Child has the same erasure as instanceCase1(Collection) of type Parent but does not override it\n" +
6078
			"----------\n" +
6110
			"----------\n" +
6079
			"5. WARNING in Parent.java (at line 12)\n" +
6111
			"6. WARNING in Parent.java (at line 12)\n" +
6080
			"	@Override void instanceCase2(Collection c) {}\n" +
6112
			"	@Override void instanceCase2(Collection c) {}\n" +
6081
			"	                             ^^^^^^^^^^\n" +
6113
			"	                             ^^^^^^^^^^\n" +
6082
			"Collection is a raw type. References to generic type Collection<E> should be parameterized\n" +
6114
			"Collection is a raw type. References to generic type Collection<E> should be parameterized\n" +
6083
			"----------\n"
6115
			"----------\n"
6116
			
6084
			// @Override is an error for instanceCase1
6117
			// @Override is an error for instanceCase1
6085
			// name clash: instanceCase1(Collection<String>) in Child and instanceCase1(Collection) in Parent have the same erasure, yet neither overrides the other
6118
			// name clash: instanceCase1(Collection<String>) in Child and instanceCase1(Collection) in Parent have the same erasure, yet neither overrides the other
6086
		);
6119
		);
Lines 8828-8867 Link Here
8828
			"class X {}\n" +
8861
			"class X {}\n" +
8829
			"class Y<T> {}"
8862
			"class Y<T> {}"
8830
		},
8863
		},
8831
		"----------\n" +
8864
		this.complianceLevel < ClassFileConstants.JDK1_7 ?
8832
		"1. ERROR in B.java (at line 2)\n" +
8865
		"----------\n" + 
8833
		"	static void a(X x) {}\n" +
8866
		"1. ERROR in B.java (at line 2)\n" + 
8834
		"	            ^^^^^^\n" +
8867
		"	static void a(X x) {}\n" + 
8835
		"This static method cannot hide the instance method from A\n" +
8868
		"	            ^^^^^^\n" + 
8836
		"----------\n" +
8869
		"This static method cannot hide the instance method from A\n" + 
8837
		"2. ERROR in B.java (at line 3)\n" +
8870
		"----------\n" + 
8838
		"	static void b(Y<String> y) {}\n" +
8871
		"----------\n" + 
8839
		"	            ^^^^^^^^^^^^^^\n" +
8872
		"1. ERROR in B2.java (at line 2)\n" + 
8840
		"Name clash: The method b(Y<String>) of type B has the same erasure as b(Y<Integer>) of type A but does not override it\n" +
8873
		"	static void b(Y<Integer> y) {}\n" + 
8841
		"----------\n" +
8874
		"	            ^^^^^^^^^^^^^^^\n" + 
8842
		"----------\n" +
8875
		"This static method cannot hide the instance method from A\n" + 
8843
		"1. ERROR in B2.java (at line 2)\n" +
8876
		"----------\n" + 
8844
		"	static void b(Y<Integer> y) {}\n" +
8877
		"----------\n" + 
8845
		"	            ^^^^^^^^^^^^^^^\n" +
8878
		"1. ERROR in C.java (at line 3)\n" + 
8846
		"This static method cannot hide the instance method from A\n" +
8879
		"	void b(Y<String> y) {}\n" + 
8847
		"----------\n" +
8880
		"	     ^^^^^^^^^^^^^^\n" + 
8848
		"----------\n" +
8881
		"Name clash: The method b(Y<String>) of type C has the same erasure as b(Y<Integer>) of type A but does not override it\n" + 
8849
		"1. ERROR in C.java (at line 3)\n" +
8882
		"----------\n" + 
8850
		"	void b(Y<String> y) {}\n" +
8883
		"2. ERROR in C.java (at line 4)\n" + 
8851
		"	     ^^^^^^^^^^^^^^\n" +
8884
		"	void c(X x) {}\n" + 
8852
		"Name clash: The method b(Y<String>) of type C has the same erasure as b(Y<Integer>) of type A but does not override it\n" +
8885
		"	     ^^^^^^\n" + 
8853
		"----------\n" +
8886
		"This instance method cannot override the static method from A\n" + 
8854
		"2. ERROR in C.java (at line 4)\n" +
8887
		"----------\n" + 
8855
		"	void c(X x) {}\n" +
8888
		"----------\n" + 
8856
		"	     ^^^^^^\n" +
8889
		"1. ERROR in C2.java (at line 3)\n" + 
8857
		"This instance method cannot override the static method from A\n" +
8890
		"	void d(Y<Integer> y) {}\n" + 
8858
		"----------\n" +
8891
		"	     ^^^^^^^^^^^^^^^\n" + 
8859
		"----------\n" +
8892
		"This instance method cannot override the static method from A\n" + 
8860
		"1. ERROR in C2.java (at line 3)\n" +
8861
		"	void d(Y<Integer> y) {}\n" +
8862
		"	     ^^^^^^^^^^^^^^^\n" +
8863
		"This instance method cannot override the static method from A\n" +
8864
		"----------\n"
8893
		"----------\n"
8894
		:"----------\n" + 
8895
		"1. ERROR in B.java (at line 2)\n" + 
8896
		"	static void a(X x) {}\n" + 
8897
		"	            ^^^^^^\n" + 
8898
		"This static method cannot hide the instance method from A\n" + 
8899
		"----------\n" + 
8900
		"2. ERROR in B.java (at line 3)\n" + 
8901
		"	static void b(Y<String> y) {}\n" + 
8902
		"	            ^^^^^^^^^^^^^^\n" + 
8903
		"Name clash: The method b(Y<String>) of type B has the same erasure as b(Y<Integer>) of type A but does not hide it\n" + 
8904
		"----------\n" + 
8905
		"3. ERROR in B.java (at line 5)\n" + 
8906
		"	static void d(Y<String> y) {}\n" + 
8907
		"	            ^^^^^^^^^^^^^^\n" + 
8908
		"Name clash: The method d(Y<String>) of type B has the same erasure as d(Y<Integer>) of type A but does not hide it\n" + 
8909
		"----------\n" + 
8910
		"----------\n" + 
8911
		"1. ERROR in B2.java (at line 2)\n" + 
8912
		"	static void b(Y<Integer> y) {}\n" + 
8913
		"	            ^^^^^^^^^^^^^^^\n" + 
8914
		"This static method cannot hide the instance method from A\n" + 
8915
		"----------\n" + 
8916
		"----------\n" + 
8917
		"1. ERROR in C.java (at line 3)\n" + 
8918
		"	void b(Y<String> y) {}\n" + 
8919
		"	     ^^^^^^^^^^^^^^\n" + 
8920
		"Name clash: The method b(Y<String>) of type C has the same erasure as b(Y<Integer>) of type A but does not override it\n" + 
8921
		"----------\n" + 
8922
		"2. ERROR in C.java (at line 4)\n" + 
8923
		"	void c(X x) {}\n" + 
8924
		"	     ^^^^^^\n" + 
8925
		"This instance method cannot override the static method from A\n" + 
8926
		"----------\n" + 
8927
		"3. ERROR in C.java (at line 5)\n" + 
8928
		"	void d(Y<String> y) {}\n" + 
8929
		"	     ^^^^^^^^^^^^^^\n" + 
8930
		"Name clash: The method d(Y<String>) of type C has the same erasure as d(Y<Integer>) of type A but does not hide it\n" + 
8931
		"----------\n" + 
8932
		"----------\n" + 
8933
		"1. ERROR in C2.java (at line 3)\n" + 
8934
		"	void d(Y<Integer> y) {}\n" + 
8935
		"	     ^^^^^^^^^^^^^^^\n" + 
8936
		"This instance method cannot override the static method from A\n" + 
8937
		"----------\n"
8938
		
8865
	);
8939
	);
8866
}
8940
}
8867
public void test150() {
8941
public void test150() {
Lines 12328-12331 Link Here
12328
		"The method f(String) is ambiguous for the type B<String>\n" + 
12402
		"The method f(String) is ambiguous for the type B<String>\n" + 
12329
		"----------\n");
12403
		"----------\n");
12330
}
12404
}
12405
public void test345949a() throws Exception {
12406
	if (new CompilerOptions(getCompilerOptions()).sourceLevel < ClassFileConstants.JDK1_7) return;
12407
	this.runNegativeTest(
12408
		new String[] {
12409
			"Sub.java",
12410
			"class A<T> {}\n" +
12411
			"class Super {\n" +
12412
			"    public static void foo(A<Number> p) {}\n" +
12413
			"}\n" +
12414
			"public class Sub extends Super {\n" +
12415
			"	 public static void foo(A<Integer> p) {}\n" +
12416
			"}\n"
12417
		},
12418
		"----------\n" + 
12419
		"1. ERROR in Sub.java (at line 6)\n" + 
12420
		"	public static void foo(A<Integer> p) {}\n" + 
12421
		"	                   ^^^^^^^^^^^^^^^^^\n" + 
12422
		"Name clash: The method foo(A<Integer>) of type Sub has the same erasure as foo(A<Number>) of type Super but does not hide it\n" + 
12423
		"----------\n");
12424
}
12425
public void _test345949b() throws Exception {
12426
	this.runNegativeTest(
12427
		new String[] {
12428
			"Sub.java",
12429
			"class Super {\n" +
12430
			"    public static void foo() {}\n" +
12431
			"}\n" +
12432
			"public class Sub extends Super {\n" +
12433
			"	 public static <T> void foo() {}\n" +
12434
			"}\n"
12435
		},
12436
		"");
12437
}
12331
}
12438
}

Return to bug 345949