Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java =================================================================== RCS file: /home/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v retrieving revision 1.17 diff -u -r1.17 BatchCompilerTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 1 Jun 2005 09:06:31 -0000 1.17 +++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 1 Jun 2005 09:24:49 -0000 @@ -1562,6 +1562,148 @@ "incorrect classpath: dummy\n", false); } +// Extraneous auto-build error message - https://bugs.eclipse.org/bugs/show_bug.cgi?id=93377 +// More complex test case than _test30 +public void _test032(){ + this.runConformTest( + new String[] { + "p/X.java", + "package p;\n" + + "import java.io.Serializable;\n" + + "public interface X, \n" + + " U extends X.XX, \n" + + " V extends X.XY> {\n" + + " public interface XX, \n" + + " UU extends X.XY> \n" + + " extends Serializable {\n" + + " }\n" + + " public interface XY extends Serializable {\n" + + " }\n" + + "}\n", + }, + "\"" + OUTPUT_DIR + File.separator + "p/X.java\"" + + " -1.5 -g -preserveAllLocals" + + " -proceedOnError -referenceInfo" + + " -d \"" + OUTPUT_DIR + "\"", + "", + "", + true); + this.runConformTest( + new String[] { + "p/Y.java", + "package p;\n" + + "import java.util.*;\n" + + "import p.X.*;\n" + + "public class Y, \n" + + " U extends X.XX, \n" + + " V extends X.XY> {\n" + + " private final Map m1 = new HashMap();\n" + + " private final Map m2 = new HashMap();\n" + + " private final Z m3;\n" + + "\n" + + " public Y(final Z p1) {\n" + + " this.m3 = p1;\n" + + " }\n" + + "\n" + + " public void foo1(final U p1, final V p2, final T p3) {\n" + + " m1.put(p1, p2);\n" + + " m2.put(p1, p3);\n" + + " m3.foo2(p1, p2);\n" + + " }\n" + + "\n" + + " public void foo3(final U p1) {\n" + + " assert m1.containsKey(p1);\n" + + " m1.remove(p1);\n" + + " m2.remove(p1);\n" + + " m3.foo2(p1, null);\n" + + " }\n" + + "\n" + + " public Collection foo4() {\n" + + " return Collections.unmodifiableCollection(m2.values());\n" + + " }\n" + + "\n" + + " public void foo5(final Map, XY> p1) {\n" + + " p1.putAll(m1);\n" + + " }\n" + + "\n" + + " public void foo6(final Map, XY> p1) {\n" + + " m1.keySet().retainAll(p1.keySet());\n" + + " m2.keySet().retainAll(p1.keySet());\n" + + " }\n" + + "}\n", + "p/Z.java", + "package p;\n" + + "\n" + + "import java.util.*;\n" + + "\n" + + "import p.X.*;\n" + + "\n" + + "public class Z {\n" + + " private final Map, \n" + + " Y, ? extends XY>> \n" + + " m1 = new HashMap, \n" + + " Y, ? extends XY>>();\n" + + "\n" + + " private Map, \n" + + " X.XY> \n" + + " m2 = new HashMap, \n" + + " X.XY>();\n" + + "\n" + + " public , \n" + + " U extends X.XX, \n" + + " V extends X.XY> \n" + + " Y foo1(final Class p1) {\n" + + " Y l1 = m1.get(p1);\n" + + " if (l1 == null) {\n" + + " l1 = new Y(this);\n" + + " m1.put(p1, l1);\n" + + " }\n" + + " return l1;\n" + + " }\n" + + "\n" + + " public , \n" + + " UU extends X.XY> \n" + + " void foo2(final TT p1, final UU p2) {\n" + + " m2.put((XX) p1, p2);\n" + + " }\n" + + "\n" + + " public Map, XY> foo3() {\n" + + " final Map, \n" + + " XY> l1 = new HashMap, \n" + + " XY>();\n" + + " for (final Y, \n" + + " ? extends XY> \n" + + " i : m1.values()) {\n" + + " i.foo5(l1);\n" + + " }\n" + + " return l1;\n" + + " }\n" + + "\n" + + " public void foo4(final Object p1, final Map, \n" + + " XY> p2) {\n" + + " for (final Y, \n" + + " ? extends XY> i : m1.values()) {\n" + + " i.foo6(p2);\n" + + " }\n" + + " for (final Map.Entry, \n" + + " XY> i : p2.entrySet()) {\n" + + " final XX l1 = (XX) i.getKey();\n" + + " }\n" + + " }\n" + + "}\n" + }, + "\"" + OUTPUT_DIR + File.separator + "p/Y.java\"" + + " \"" + OUTPUT_DIR + File.separator + "p/Z.java\"" + + " -1.5 -g -preserveAllLocals" + + " -cp \"" + OUTPUT_DIR + File.separator + "\"" + + " -proceedOnError -referenceInfo" + + " -d \"" + OUTPUT_DIR + "\"", + "", + "", + false); +} public static Class testClass() { return BatchCompilerTest.class; }