### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java,v retrieving revision 1.201 diff -u -r1.201 MethodVerifyTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 26 Aug 2010 15:01:18 -0000 1.201 +++ src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 9 Sep 2010 15:37:57 -0000 @@ -16,6 +16,7 @@ import junit.framework.Test; import org.eclipse.jdt.core.Flags; +import org.eclipse.jdt.core.JavaCore; import org.eclipse.jdt.core.ToolFactory; import org.eclipse.jdt.core.tests.util.Util; import org.eclipse.jdt.core.util.ClassFileBytesDisassembler; @@ -27,7 +28,7 @@ public class MethodVerifyTest extends AbstractComparableTest { static { // TESTS_NAMES = new String[] { "test211" }; -// TESTS_NUMBERS = new int[] { 184 }; +// TESTS_NUMBERS = new int[] { 213 }; // TESTS_RANGE = new int[] { 190, -1}; } @@ -11009,4 +11010,55 @@ "Name clash: The method foo(T) of type Interface has the same erasure as foo(T) of type Base but does not override it\n" + "----------\n"); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=324850 +public void _test213() { + Map compilerOptions15 = getCompilerOptions(); + compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_5); + compilerOptions15.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_5); + compilerOptions15.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_5); + this.runConformTest( + new String[] { + "Y.java", + "public abstract class Y implements I {\n" + + " public final Y foo(Object o, J j) {\n" + + " return null;\n" + + " }\n" + + " public final void bar(Object o, J j, Y y) {\n" + + " }\n" + + "}", + "I.java", + "public interface I {\n" + + " public S foo(Object o, J j);\n" + + " public void bar(Object o, J j, S s);\n" + + "}", + "J.java", + "public interface J {}" + }, + "", + null, + true, + null, + compilerOptions15, + null); + + Map compilerOptions14 = getCompilerOptions(); + compilerOptions14.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, JavaCore.VERSION_1_2); + compilerOptions14.put(JavaCore.COMPILER_COMPLIANCE, JavaCore.VERSION_1_4); + compilerOptions14.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_3); + this.runConformTest( + new String[] { + "X.java", + "public class X {\n" + + " public Object foo() {\n" + + " return new Y() {};\n" + + " }\n" + + "}" + }, + "", + null, + false, + null, + compilerOptions14, + null); +} }