Index: src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java,v retrieving revision 1.11 diff -u -r1.11 CompatibilityRulesTests.java --- src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java 6 Jun 2005 13:03:12 -0000 1.11 +++ src/org/eclipse/jdt/core/tests/dom/CompatibilityRulesTests.java 13 Jun 2005 15:35:34 -0000 @@ -28,14 +28,18 @@ } public static Test suite() { - if (false) { - Suite suite = new Suite(CompatibilityRulesTests.class.getName()); - suite.addTest(new CompatibilityRulesTests("test027")); - return suite; - } - return new Suite(CompatibilityRulesTests.class); + return buildTestSuite(CompatibilityRulesTests.class); } + // Use this static initializer to specify subset for tests + // All specified tests which do not belong to the class are skipped... + static { +// TESTS_PREFIX = "testBug86380"; +// TESTS_NAMES = new String[] { "test030" }; +// TESTS_NUMBERS = new int[] { 83230 }; +// TESTS_RANGE = new int[] { 83304, -1 }; + } + public void setUpSuite() throws Exception { super.setUpSuite(); createJavaProject("P", new String[] {""}, new String[] {"JCL15_LIB"}, "", "1.5"); @@ -640,4 +644,29 @@ assertTrue("Y#bar() should not override X#foo()", !bindings[0].overrides(bindings[1])); } + /* + * Ensures that a method in a subtype overrides a method the super parameterized type. + */ + public void test030() throws JavaModelException { + IMethodBinding[] bindings = createMethodBindings( + new String[] { + "/P/p1/X.java", + "package p1;\n" + + "public class X {\n" + + " void foo(T t) {\n" + + " }\n" + + "}", + "/P/p1/Y.java", + "package p1;\n" + + "public class Y extends X {\n" + + " void foo(String s) {\n" + + " }\n" + + "}", + }, + new String[] { + "Lp1/Y;.foo(Ljava/lang/String;)V", + "Lp1/X;.foo(TT;)V" + }); + assertTrue("Y#foo(String) should override X#foo(T)", bindings[0].overrides(bindings[1])); + } }