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

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/TypeVariableBinding.java (-2 / +3 lines)
Lines 291-298 Link Here
291
	}
291
	}
292
292
293
	boolean hasOnlyRawBounds() {
293
	boolean hasOnlyRawBounds() {
294
		if (this.superclass != null && !this.superclass.isRawType())
294
		if (this.superclass != null && this.firstBound == this.superclass)
295
			return false;
295
			if (!this.superclass.isRawType())
296
				return false;
296
297
297
		if (this.superInterfaces != null)
298
		if (this.superInterfaces != null)
298
			for (int i = 0, l = this.superInterfaces.length; i < l; i++)
299
			for (int i = 0, l = this.superInterfaces.length; i < l; i++)
(-)src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java (+29 lines)
Lines 3037-3040 Link Here
3037
		"----------\n"
3037
		"----------\n"
3038
	);
3038
	);
3039
}
3039
}
3040
3041
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=266421
3042
public void test075() {
3043
	this.runNegativeTest(
3044
		new String[] {
3045
			"C.java",
3046
			"abstract class A<T extends Comparable> {\n" +
3047
			"	abstract int x(T val);\n" +
3048
			"}\n" +
3049
			"class B<T extends Comparable> extends A<T> {\n" +
3050
			"	@Override int x(T val) { return 0; }\n" +
3051
			"}\n" +
3052
			"class C extends B<Double> {\n" +
3053
			"    int test(Double val) { return x(val); }\n" +
3054
			"}"
3055
		},
3056
		"----------\n" + 
3057
		"1. WARNING in C.java (at line 1)\n" + 
3058
		"	abstract class A<T extends Comparable> {\n" + 
3059
		"	                           ^^^^^^^^^^\n" + 
3060
		"Comparable is a raw type. References to generic type Comparable<T> should be parameterized\n" + 
3061
		"----------\n" + 
3062
		"2. WARNING in C.java (at line 4)\n" + 
3063
		"	class B<T extends Comparable> extends A<T> {\n" + 
3064
		"	                  ^^^^^^^^^^\n" + 
3065
		"Comparable is a raw type. References to generic type Comparable<T> should be parameterized\n" + 
3066
		"----------\n"
3067
	);
3068
}
3040
}
3069
}

Return to bug 266421