### 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.221 diff -u -r1.221 MethodVerifyTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 3 Dec 2010 08:44:25 -0000 1.221 +++ src/org/eclipse/jdt/core/tests/compiler/regression/MethodVerifyTest.java 4 Jan 2011 09:44:46 -0000 @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2000, 2010 IBM Corporation and others. + * Copyright (c) 2000, 2011 IBM Corporation and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -11875,4 +11875,97 @@ compilerOptions14, null); } +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=332744 (all 1.5+) +public void test332744() { + Map compilerOptions15 = getCompilerOptions(); + compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, CompilerOptions.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[] { + "EList.java", + "import java.util.List;\n" + + "public interface EList extends List {\n" + + "}\n", + "FeatureMap.java", + "public interface FeatureMap extends EList {\n" + + " interface Entry {\n" + + " }\n" + + "}\n", + "InternalEList.java", + "public interface InternalEList extends EList {\n" + + "}\n" + }, + "", + null, + true, + null, + compilerOptions15, + null); + + this.runConformTest( + new String[] { + "Client.java", + "public class Client {\n" + + " Client(FeatureMap fm) {\n" + + " InternalEList e = (InternalEList) fm;\n" + + " }\n" + + "}\n" + }, + "", + null, + false, + null, + compilerOptions15, + null); +} +// https://bugs.eclipse.org/bugs/show_bug.cgi?id=332744 (1.4/1.5 mix) +public void test332744b() { + Map compilerOptions15 = getCompilerOptions(); + compilerOptions15.put(JavaCore.COMPILER_CODEGEN_TARGET_PLATFORM, CompilerOptions.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[] { + "EList.java", + "import java.util.List;\n" + + "public interface EList extends List {\n" + + "}\n", + "FeatureMap.java", + "public interface FeatureMap extends EList {\n" + + " interface Entry {\n" + + " }\n" + + "}\n", + "InternalEList.java", + "public interface InternalEList extends EList {\n" + + "}\n" + }, + "", + 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); + compilerOptions14.put(JavaCore.COMPILER_PB_UNNECESSARY_TYPE_CHECK, JavaCore.IGNORE); + this.runConformTest( + new String[] { + "Client.java", + "public class Client {\n" + + " Client(FeatureMap fm) {\n" + + " InternalEList e = (InternalEList) fm;\n" + + " }\n" + + "}\n" + }, + "", + null, + false, + null, + compilerOptions14, + null); +} }