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

(-)compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java (-3 / +1 lines)
Lines 2580-2589 Link Here
2580
				}
2580
				}
2581
				if (oneParam.isCompatibleWith(twoParam)) {
2581
				if (oneParam.isCompatibleWith(twoParam)) {
2582
					if (oneParam.leafComponentType().isRawType()) {
2582
					if (oneParam.leafComponentType().isRawType()) {
2583
						if (oneParam.needsUncheckedConversion(twoParam))
2584
							return false;
2585
						// A#RAW is not more specific than a rawified A<T>
2583
						// A#RAW is not more specific than a rawified A<T>
2586
						if (oneParam == one.original().parameters[i] && twoParam != two.original().parameters[i])
2584
						if (oneParam.needsUncheckedConversion(two.original().parameters[i]))
2587
							return false;
2585
							return false;
2588
					}
2586
					}
2589
				} else {
2587
				} else {
(-)src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java (+34 lines)
Lines 2002-2005 Link Here
2002
		},
2002
		},
2003
		"");
2003
		"");
2004
}
2004
}
2005
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=188741
2006
public void test058() {
2007
	this.runConformTest(
2008
		new String[] {
2009
			"X.java",
2010
			"public class X extends A {\n" + 
2011
			"	void x(G g) { System.out.print(1); }\n" +  
2012
			"	public static void main(String[] s) {\n" + 
2013
			"		H h = new H();\n" +
2014
			"		new X().x(h);\n" +
2015
			"	}\n" + 
2016
			"}\n" +
2017
			"class A<T> {\n" +
2018
			"	void x(T t) { System.out.print(2); }\n" +
2019
			"}\n" +
2020
			"class F<T> {}\n" +
2021
			"class G<T> extends F<T> {}\n" +
2022
			"class H<T> extends G<T> {}"
2023
		},
2024
		"1");
2025
}
2026
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=188741
2027
public void test058a() {
2028
	this.runConformTest(
2029
		new String[] {
2030
			"X.java",
2031
			"public class X extends java.util.ArrayList {\n" + 
2032
			"	private static final long serialVersionUID = 1L;\n" + 
2033
			"	public void add(Comparable o) {}\n" + 
2034
			"	public void test() { add(\"hello\"); }\n" + 
2035
			"}"
2036
		},
2037
		"");
2038
}
2005
}
2039
}

Return to bug 188741