Index: compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java,v retrieving revision 1.308 diff -u -r1.308 Scope.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 22 May 2007 15:42:37 -0000 1.308 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/Scope.java 23 May 2007 19:33:55 -0000 @@ -2580,10 +2580,8 @@ } if (oneParam.isCompatibleWith(twoParam)) { if (oneParam.leafComponentType().isRawType()) { - if (oneParam.needsUncheckedConversion(twoParam)) - return false; // A#RAW is not more specific than a rawified A - if (oneParam == one.original().parameters[i] && twoParam != two.original().parameters[i]) + if (oneParam.needsUncheckedConversion(two.original().parameters[i])) return false; } } else { Index: src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java,v retrieving revision 1.43 diff -u -r1.43 AmbiguousMethodTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java 15 May 2007 14:39:20 -0000 1.43 +++ src/org/eclipse/jdt/core/tests/compiler/regression/AmbiguousMethodTest.java 23 May 2007 19:33:56 -0000 @@ -2002,4 +2002,38 @@ }, ""); } +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=188741 +public void test058() { + this.runConformTest( + new String[] { + "X.java", + "public class X extends A {\n" + + " void x(G g) { System.out.print(1); }\n" + + " public static void main(String[] s) {\n" + + " H h = new H();\n" + + " new X().x(h);\n" + + " }\n" + + "}\n" + + "class A {\n" + + " void x(T t) { System.out.print(2); }\n" + + "}\n" + + "class F {}\n" + + "class G extends F {}\n" + + "class H extends G {}" + }, + "1"); +} +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=188741 +public void test058a() { + this.runConformTest( + new String[] { + "X.java", + "public class X extends java.util.ArrayList {\n" + + " private static final long serialVersionUID = 1L;\n" + + " public void add(Comparable o) {}\n" + + " public void test() { add(\"hello\"); }\n" + + "}" + }, + ""); +} }