### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java,v retrieving revision 1.84 diff -u -r1.84 ParameterizedTypeBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 25 Jun 2006 21:33:33 -0000 1.84 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/ParameterizedTypeBinding.java 6 Jul 2006 11:03:45 -0000 @@ -97,7 +97,7 @@ for (int i = 0; i < length; i++) { TypeBinding argument = originalArguments[i]; if (argument.kind() == Binding.WILDCARD_TYPE && ((WildcardBinding)argument).otherBounds == null) { // no capture for intersection types - capturedArguments[i] = new CaptureBinding((WildcardBinding) argument, contextType, position); + capturedArguments[i] = new CaptureBinding((WildcardBinding) argument, contextType, position, scope.compilationUnitScope().nextCaptureID()); } else { capturedArguments[i] = argument; } Index: compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java,v retrieving revision 1.101 diff -u -r1.101 CompilationUnitScope.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java 14 Jun 2006 14:24:55 -0000 1.101 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/CompilationUnitScope.java 6 Jul 2006 11:03:44 -0000 @@ -20,21 +20,22 @@ public class CompilationUnitScope extends Scope { -public LookupEnvironment environment; -public CompilationUnitDeclaration referenceContext; -public char[][] currentPackageName; -public PackageBinding fPackage; -public ImportBinding[] imports; -public HashtableOfObject typeOrPackageCache; // used in Scope.getTypeOrPackage() - -public SourceTypeBinding[] topLevelTypes; - -private CompoundNameVector qualifiedReferences; -private SimpleNameVector simpleNameReferences; -private ObjectVector referencedTypes; -private ObjectVector referencedSuperTypes; - -HashtableOfType constantPoolNameUsage; + public LookupEnvironment environment; + public CompilationUnitDeclaration referenceContext; + public char[][] currentPackageName; + public PackageBinding fPackage; + public ImportBinding[] imports; + public HashtableOfObject typeOrPackageCache; // used in Scope.getTypeOrPackage() + + public SourceTypeBinding[] topLevelTypes; + + private CompoundNameVector qualifiedReferences; + private SimpleNameVector simpleNameReferences; + private ObjectVector referencedTypes; + private ObjectVector referencedSuperTypes; + + HashtableOfType constantPoolNameUsage; + private int captureID = 1; public CompilationUnitScope(CompilationUnitDeclaration unit, LookupEnvironment environment) { super(COMPILATION_UNIT_SCOPE, null); @@ -561,13 +562,17 @@ return findImport(compoundName, compoundName.length); return findSingleImport(compoundName, isStaticImport); } + +public int nextCaptureID() { + return this.captureID++; +} + /* Answer the problem reporter to use for raising new problems. * * Note that as a side-effect, this updates the current reference context * (unit, type or method) in case the problem handler decides it is necessary * to abort. */ - public ProblemReporter problemReporter() { ProblemReporter problemReporter = referenceContext.problemReporter; problemReporter.referenceContext = referenceContext; Index: compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java,v retrieving revision 1.42 diff -u -r1.42 TypeConstants.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java 29 Mar 2006 02:45:27 -0000 1.42 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/TypeConstants.java 6 Jul 2006 11:03:45 -0000 @@ -43,7 +43,8 @@ char[] WILDCARD_MINUS = { '-' }; char[] WILDCARD_STAR = { '*' }; char[] WILDCARD_PLUS = { '+' }; - char[] WILDCARD_CAPTURE_NAME = "capture-of ".toCharArray(); //$NON-NLS-1$ + char[] WILDCARD_CAPTURE_NAME_PREFIX = "capture#".toCharArray(); //$NON-NLS-1$ + char[] WILDCARD_CAPTURE_NAME_SUFFIX = "-of ".toCharArray(); //$NON-NLS-1$ char[] WILDCARD_CAPTURE = { '!' }; char[] BYTE = "byte".toCharArray(); //$NON-NLS-1$ char[] SHORT = "short".toCharArray(); //$NON-NLS-1$ Index: compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java,v retrieving revision 1.18 diff -u -r1.18 CaptureBinding.java --- compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java 29 Mar 2006 02:40:11 -0000 1.18 +++ compiler/org/eclipse/jdt/internal/compiler/lookup/CaptureBinding.java 6 Jul 2006 11:03:42 -0000 @@ -18,18 +18,20 @@ public TypeBinding lowerBound; public WildcardBinding wildcard; + public int captureID; /* information to compute unique binding key */ public ReferenceBinding sourceType; public int position; - public CaptureBinding(WildcardBinding wildcard, ReferenceBinding sourceType, int position) { - super(TypeConstants.WILDCARD_CAPTURE_NAME, null, 0); + public CaptureBinding(WildcardBinding wildcard, ReferenceBinding sourceType, int position, int captureID) { + super(TypeConstants.WILDCARD_CAPTURE_NAME_PREFIX, null, 0); this.wildcard = wildcard; this.modifiers = ClassFileConstants.AccPublic | ExtraCompilerModifiers.AccGenericSignature; // treat capture as public this.fPackage = wildcard.fPackage; this.sourceType = sourceType; this.position = position; + this.captureID = captureID; } /* @@ -54,8 +56,15 @@ } public String debugName() { + if (this.wildcard != null) { - return String.valueOf(TypeConstants.WILDCARD_CAPTURE_NAME) + this.wildcard.debugName(); + StringBuffer buffer = new StringBuffer(10); + buffer + .append(TypeConstants.WILDCARD_CAPTURE_NAME_PREFIX) + .append(this.captureID) + .append(TypeConstants.WILDCARD_CAPTURE_NAME_SUFFIX) + .append(this.wildcard.debugName()); + return buffer.toString(); } return super.debugName(); } @@ -156,21 +165,45 @@ public char[] readableName() { if (this.wildcard != null) { - return CharOperation.concat(TypeConstants.WILDCARD_CAPTURE_NAME, this.wildcard.readableName()); + StringBuffer buffer = new StringBuffer(10); + buffer + .append(TypeConstants.WILDCARD_CAPTURE_NAME_PREFIX) + .append(this.captureID) + .append(TypeConstants.WILDCARD_CAPTURE_NAME_SUFFIX) + .append(this.wildcard.readableName()); + int length = buffer.length(); + char[] name = new char[length]; + buffer.getChars(0, length, name, 0); + return name; } return super.readableName(); } public char[] shortReadableName() { if (this.wildcard != null) { - return CharOperation.concat(TypeConstants.WILDCARD_CAPTURE_NAME, this.wildcard.shortReadableName()); + StringBuffer buffer = new StringBuffer(10); + buffer + .append(TypeConstants.WILDCARD_CAPTURE_NAME_PREFIX) + .append(this.captureID) + .append(TypeConstants.WILDCARD_CAPTURE_NAME_SUFFIX) + .append(this.wildcard.shortReadableName()); + int length = buffer.length(); + char[] name = new char[length]; + buffer.getChars(0, length, name, 0); + return name; } - return super.shortReadableName(); + return super.shortReadableName(); } public String toString() { if (this.wildcard != null) { - return String.valueOf(TypeConstants.WILDCARD_CAPTURE_NAME) + this.wildcard.toString(); + StringBuffer buffer = new StringBuffer(10); + buffer + .append(TypeConstants.WILDCARD_CAPTURE_NAME_PREFIX) + .append(this.captureID) + .append(TypeConstants.WILDCARD_CAPTURE_NAME_SUFFIX) + .append(this.wildcard); + return buffer.toString(); } return super.toString(); } #P org.eclipse.jdt.core.tests.model Index: src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.model/src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java,v retrieving revision 1.204 diff -u -r1.204 ASTConverter15Test.java --- src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 30 Jun 2006 10:38:47 -0000 1.204 +++ src/org/eclipse/jdt/core/tests/dom/ASTConverter15Test.java 6 Jul 2006 11:04:14 -0000 @@ -5183,7 +5183,7 @@ assertNotNull("No node", node); assertEquals("Not a compilation unit", ASTNode.COMPILATION_UNIT, node.getNodeType()); CompilationUnit compilationUnit = (CompilationUnit) node; - assertProblemsSize(compilationUnit, 1, "Type safety: The cast from X.BB to X.BD is actually checking against the erased type X.BD"); + assertProblemsSize(compilationUnit, 1, "Type safety: The cast from X.BB to X.BD is actually checking against the erased type X.BD"); node = getASTNode(compilationUnit, 0, 2, 1); assertEquals("Not a variable declaration statement", ASTNode.VARIABLE_DECLARATION_STATEMENT, node.getNodeType()); VariableDeclarationStatement statement = (VariableDeclarationStatement) node; #P org.eclipse.jdt.core.tests.compiler Index: src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java,v retrieving revision 1.505 diff -u -r1.505 GenericTypeTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 28 Jun 2006 15:50:14 -0000 1.505 +++ src/org/eclipse/jdt/core/tests/compiler/regression/GenericTypeTest.java 6 Jul 2006 11:06:07 -0000 @@ -3016,7 +3016,7 @@ "3. ERROR in X.java (at line 9)\n" + " x.t.bar(\"ESS\");\n" + " ^^^\n" + - "The method bar(String) is undefined for the type capture-of ?\n" + + "The method bar(String) is undefined for the type capture#2-of ?\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=85303 @@ -3810,7 +3810,7 @@ "2. ERROR in X.java (at line 7)\n" + " Class c3 = s.getClass();\n" + " ^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Class to Class\n" + + "Type mismatch: cannot convert from Class to Class\n" + "----------\n"); } // variation on test0128 @@ -3845,7 +3845,7 @@ "2. ERROR in X.java (at line 8)\n" + " Class c3 = s.getClass();\n" + " ^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Class to Class\n" + + "Type mismatch: cannot convert from Class to Class\n" + "----------\n" + "3. ERROR in X.java (at line 14)\n" + " public Class getClass() {\n" + @@ -4030,7 +4030,7 @@ "3. ERROR in Z.java (at line 6)\n" + " zs.foo();\n" + " ^^^\n" + - "The method foo(Z) in the type Z is not applicable for the arguments ()\n" + + "The method foo(Z) in the type Z is not applicable for the arguments ()\n" + "----------\n"); } public void test0137() { @@ -4122,7 +4122,7 @@ "2. ERROR in X.java (at line 10)\n" + " x.get().afoo();\n" + " ^^^^\n" + - "The method afoo() is undefined for the type capture-of ? extends BX\n" + + "The method afoo() is undefined for the type capture#1-of ? extends BX\n" + "----------\n"); } // extending wildcard considers its bound prior to its corresponding variable @@ -4184,7 +4184,7 @@ "1. ERROR in X.java (at line 11)\n" + " x.get().bfoo();\n" + " ^^^^\n" + - "The method bfoo() is undefined for the type capture-of ? super BX\n" + + "The method bfoo() is undefined for the type capture#2-of ? super BX\n" + "----------\n"); } public void test0142() { @@ -4229,7 +4229,7 @@ "3. ERROR in X.java (at line 10)\n" + " x = identity(x);\n" + " ^^^^^^^^\n" + - "Bound mismatch: The generic method identity(X

) of type X is not applicable for the arguments (X). The inferred type capture-of ? extends X is not a valid substitute for the bounded parameter

\n" + + "Bound mismatch: The generic method identity(X

) of type X is not applicable for the arguments (X). The inferred type capture#2-of ? extends X is not a valid substitute for the bounded parameter

\n" + "----------\n"); } public void test0143() { @@ -4248,7 +4248,7 @@ "1. ERROR in X.java (at line 5)\n" + " Class xo2 = xx;\n" + " ^^\n" + - "Type mismatch: cannot convert from Class to Class\n" + + "Type mismatch: cannot convert from Class to Class\n" + "----------\n"); } public void test0144() { @@ -4296,17 +4296,17 @@ "1. ERROR in X.java (at line 6)\n" + " lx.add(x);\n" + " ^^^\n" + - "The method add(capture-of ?) in the type XList is not applicable for the arguments (X)\n" + + "The method add(capture#3-of ?) in the type XList is not applicable for the arguments (X)\n" + "----------\n" + "2. ERROR in X.java (at line 7)\n" + " lx.slot = x;\n" + " ^\n" + - "Type mismatch: cannot convert from X to capture-of ?\n" + + "Type mismatch: cannot convert from X to capture#4-of ?\n" + "----------\n" + "3. ERROR in X.java (at line 8)\n" + " lx.addAll(lx);\n" + " ^^^^^^\n" + - "The method addAll(XList) in the type XList is not applicable for the arguments (XList)\n" + + "The method addAll(XList) in the type XList is not applicable for the arguments (XList)\n" + "----------\n"); } // 59628 @@ -4623,7 +4623,7 @@ "1. ERROR in X.java (at line 9)\n" + " return a.get();\n" + " ^^^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? to T\n" + + "Type mismatch: cannot convert from capture#1-of ? to T\n" + "----------\n"); } public void test0160() { @@ -4966,7 +4966,7 @@ "2. ERROR in X.java (at line 9)\n" + " return a.get();\n" + " ^^^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? to T\n" + + "Type mismatch: cannot convert from capture#1-of ? to T\n" + "----------\n"); } // Expected type inference for cast operation @@ -5000,7 +5000,7 @@ "2. ERROR in X.java (at line 9)\n" + " return a.get();\n" + " ^^^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? to T\n" + + "Type mismatch: cannot convert from capture#1-of ? to T\n" + "----------\n"); } // Expected type inference for cast operation @@ -6305,7 +6305,7 @@ "1. ERROR in X.java (at line 7)\n" + " Integer i = al.get(0); // (2)\n" + " ^^^^^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? super Integer to Integer\n" + + "Type mismatch: cannot convert from capture#2-of ? super Integer to Integer\n" + "----------\n"); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=69141 variation @@ -6326,7 +6326,7 @@ "1. ERROR in X.java (at line 6)\n" + " al.add(new Integer(1)); // (1)\n" + " ^^^\n" + - "The method add(capture-of ? extends Integer) in the type ArrayList is not applicable for the arguments (Integer)\n" + + "The method add(capture#1-of ? extends Integer) in the type ArrayList is not applicable for the arguments (Integer)\n" + "----------\n"); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=69141: variation @@ -6349,7 +6349,7 @@ "1. ERROR in X.java (at line 5)\n" + " Integer i = lx.slot;\n" + " ^^^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? super Integer to Integer\n" + + "Type mismatch: cannot convert from capture#2-of ? super Integer to Integer\n" + "----------\n"); } @@ -6617,7 +6617,7 @@ "18. ERROR in X.java (at line 11)\n" + " void m6() { List c = null; List l = (Collection)c; } // type mismatch\n" + " ^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Collection to List\n" + + "Type mismatch: cannot convert from Collection to List\n" + "----------\n"); } // conversion from raw to X is safe (no unsafe warning) @@ -6669,7 +6669,7 @@ "1. ERROR in X.java (at line 8)\n" + " li= ln;\n" + " ^^\n" + - "Type mismatch: cannot convert from List to List\n" + + "Type mismatch: cannot convert from List to List\n" + "----------\n"); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=69170 - variation @@ -7323,7 +7323,7 @@ "1. ERROR in X.java (at line 6)\n" + " return clazz.newInstance(); // ? extends Object\n" + " ^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? extends Object to X.A\n" + + "Type mismatch: cannot convert from capture#1-of ? extends Object to X.A\n" + "----------\n"); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=69799 NPE in foreach checkcast @@ -7376,12 +7376,12 @@ "1. WARNING in X.java (at line 6)\n" + " List x2= (List)ls;//unsafe\n" + " ^^^^^^^^^^^^^^^^\n" + - "Type safety: The cast from List to List is actually checking against the erased type List\n" + + "Type safety: The cast from List to List is actually checking against the erased type List\n" + "----------\n" + "2. ERROR in X.java (at line 11)\n" + " List ls2 = (List)ls;\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from List to List\n" + + "Type mismatch: cannot convert from List to List\n" + "----------\n" + "3. WARNING in X.java (at line 12)\n" + " List ls3 = (List) li;\n" + @@ -7615,7 +7615,7 @@ "2. ERROR in X.java (at line 4)\n" + " XC xcu1 = (XC) new X(); \n" + " ^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from XC to XC\n" + + "Type mismatch: cannot convert from XC to XC\n" + "----------\n" + "3. WARNING in X.java (at line 5)\n" + " XC xcu2 = (XC) new X(); \n" + @@ -10097,7 +10097,7 @@ "1. ERROR in X.java (at line 4)\n" + " out.element = in.element;\n" + " ^^^^^^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? to capture-of ?\n" + + "Type mismatch: cannot convert from capture#2-of ? to capture#1-of ?\n" + "----------\n"); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=75328 @@ -10363,7 +10363,7 @@ "1. ERROR in X.java (at line 6)\n" + " m_values = values.entrySet();\n" + " ^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Set> to Set>\n" + + "Type mismatch: cannot convert from Set> to Set>\n" + "----------\n"); } // check param type equivalences @@ -10412,7 +10412,7 @@ "1. ERROR in X.java (at line 9)\n" + " mx = x.createMX();\n" + " ^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from X.MX to X.MX\n" + + "Type mismatch: cannot convert from X.MX to X.MX\n" + "----------\n"); } // check param type equivalences @@ -10542,12 +10542,12 @@ "16. ERROR in X.java (at line 31)\n" + " target= value; // foo10 - wrong\n" + " ^^^^^\n" + - "Type mismatch: cannot convert from MX to MX\n" + + "Type mismatch: cannot convert from MX to MX\n" + "----------\n" + "17. ERROR in X.java (at line 34)\n" + " target= value; // foo11 - wrong\n" + " ^^^^^\n" + - "Type mismatch: cannot convert from MX to MX\n" + + "Type mismatch: cannot convert from MX to MX\n" + "----------\n"); } // check param type equivalences @@ -10654,7 +10654,7 @@ "1. ERROR in X.java (at line 3)\n" + " target = value;\n" + " ^^^^^\n" + - "Type mismatch: cannot convert from XC to XC\n" + + "Type mismatch: cannot convert from XC to XC\n" + "----------\n"); } public void test0372() { @@ -10764,7 +10764,7 @@ "1. ERROR in X.java (at line 4)\n" + " target = value; // foo1\n" + " ^^^^^\n" + - "Type mismatch: cannot convert from X to X\n" + + "Type mismatch: cannot convert from X to X\n" + "----------\n"); } public void test0376() { @@ -11359,7 +11359,7 @@ "1. ERROR in X.java (at line 5)\n" + " xnpe.element = new java.io.IOException();\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from IOException to capture-of ? super NullPointerException\n" + + "Type mismatch: cannot convert from IOException to capture#1-of ? super NullPointerException\n" + "----------\n"); } @@ -11707,7 +11707,7 @@ "1. WARNING in X.java (at line 4)\n" + " X x = (X) xs;\n" + " ^^^^^^^^^^^^^^\n" + - "Type safety: The cast from X to X is actually checking against the erased type X\n" + + "Type safety: The cast from X to X is actually checking against the erased type X\n" + "----------\n" + "2. ERROR in X.java (at line 5)\n" + " Zork z;\n" + @@ -11861,12 +11861,12 @@ "1. ERROR in X.java (at line 11)\n" + " list.add(new Object()); // should fail\n" + " ^^^\n" + - "The method add(capture-of ? super Exception) in the type List is not applicable for the arguments (Object)\n" + + "The method add(capture#4-of ? super Exception) in the type List is not applicable for the arguments (Object)\n" + "----------\n" + "2. ERROR in X.java (at line 12)\n" + " list.add(new Throwable()); // should fail\n" + " ^^^\n" + - "The method add(capture-of ? super Exception) in the type List is not applicable for the arguments (Throwable)\n" + + "The method add(capture#5-of ? super Exception) in the type List is not applicable for the arguments (Throwable)\n" + "----------\n"); } @@ -11903,7 +11903,7 @@ } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=78467 - public void testONLY_0412() { + public void test0412() { this.runNegativeTest( new String[] { "X.java", @@ -11932,7 +11932,7 @@ "----------\n"); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=78467 - variation - public void testONLY_0412a() { + public void test0412a() { this.runNegativeTest( new String[] { "X.java", @@ -12830,12 +12830,12 @@ "4. WARNING in X.java (at line 10)\n" + " list.add((T) other.get(0)); // checked cast\n" + " ^^^^^^^^^^^^^^^^\n" + - "Unnecessary cast from capture-of ? extends T to T\n" + + "Unnecessary cast from capture#1-of ? extends T to T\n" + "----------\n" + "5. WARNING in X.java (at line 13)\n" + " list.add((T) other.get(0)); // unchecked cast\n" + " ^^^^^^^^^^^^^^^^\n" + - "Type safety: The cast from capture-of ? super T to T is actually checking against the erased type Object\n" + + "Type safety: The cast from capture#2-of ? super T to T is actually checking against the erased type Object\n" + "----------\n"); } @@ -13364,7 +13364,7 @@ "1. ERROR in X.java (at line 9)\n" + " l.add(new X()); \n" + " ^^^\n" + - "The method add(capture-of ? extends X) in the type List is not applicable for the arguments (X)\n" + + "The method add(capture#2-of ? extends X) in the type List is not applicable for the arguments (X)\n" + "----------\n" + "2. ERROR in X.java (at line 17)\n" + " add3(lx, ls);\n" + @@ -13460,13 +13460,13 @@ "2. WARNING in X.java (at line 16)\n" + " return m_manager.getById(getClass(), new Integer(1));\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type safety: Unchecked invocation getById(Class, Integer) of the generic method getById(Class, Integer) of type Test.Manager\n" + + "Type safety: Unchecked invocation getById(Class, Integer) of the generic method getById(Class, Integer) of type Test.Manager\n" + "----------\n" + "3. WARNING in X.java (at line 16)\n" + " return m_manager.getById(getClass(), new Integer(1));\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type safety: The expression of type capture-of ? extends Test needs unchecked conversion to conform to ITest\n" + - "----------\n" ); + "Type safety: The expression of type capture#1-of ? extends Test needs unchecked conversion to conform to ITest\n" + + "----------\n"); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=82439 @@ -13508,7 +13508,7 @@ "3. ERROR in X.java (at line 8)\n" + " Class d = getClazz(); // ko\n" + " ^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Class to Class\n" + + "Type mismatch: cannot convert from Class to Class\n" + "----------\n" + "4. WARNING in X.java (at line 17)\n" + " Class c = getClass(); // ok\n" + @@ -13969,7 +13969,7 @@ "1. ERROR in X.java (at line 5)\n" + " list.add(new Object()); // should fail\n" + " ^^^\n" + - "The method add(capture-of ? super Number) in the type List is not applicable for the arguments (Object)\n" + + "The method add(capture#1-of ? super Number) in the type List is not applicable for the arguments (Object)\n" + "----------\n"); } @@ -13991,7 +13991,7 @@ "1. ERROR in X.java (at line 6)\n" + " lo = list;\n" + " ^^^^\n" + - "Type mismatch: cannot convert from List to List\n" + + "Type mismatch: cannot convert from List to List\n" + "----------\n"); } @@ -14013,7 +14013,7 @@ "1. ERROR in X.java (at line 6)\n" + " lhs.add(rhs.get(0));\n" + " ^^^\n" + - "The method add(capture-of ? super T) in the type List is not applicable for the arguments (capture-of ? extends Number)\n" + + "The method add(capture#1-of ? super T) in the type List is not applicable for the arguments (capture#2-of ? extends Number)\n" + "----------\n"); } @@ -14035,7 +14035,7 @@ "1. ERROR in X.java (at line 6)\n" + " lhs.add(rhs.get(0));\n" + " ^^^\n" + - "The method add(capture-of ? super Number) in the type List is not applicable for the arguments (capture-of ? super U)\n" + + "The method add(capture#1-of ? super Number) in the type List is not applicable for the arguments (capture#2-of ? super U)\n" + "----------\n"); } @@ -14075,7 +14075,7 @@ "1. ERROR in X.java (at line 6)\n" + " lhs.add(rhs.get(0));\n" + " ^^^\n" + - "The method add(capture-of ? super Integer) in the type List is not applicable for the arguments (capture-of ? extends Number)\n" + + "The method add(capture#1-of ? super Integer) in the type List is not applicable for the arguments (capture#2-of ? extends Number)\n" + "----------\n"); } @@ -14098,7 +14098,7 @@ "1. ERROR in X.java (at line 6)\n" + " lhs.add(rhs.get(0));\n" + " ^^^\n" + - "The method add(capture-of ? super Number) in the type List is not applicable for the arguments (capture-of ? super Integer)\n" + + "The method add(capture#1-of ? super Number) in the type List is not applicable for the arguments (capture#2-of ? super Integer)\n" + "----------\n"); } @@ -14261,7 +14261,7 @@ "1. ERROR in X.java (at line 6)\n" + " bar(l, \"\"); \n" + " ^^^\n" + - "The method bar(List, T) in the type X is not applicable for the arguments (List, String)\n" + + "The method bar(List, T) in the type X is not applicable for the arguments (List, String)\n" + "----------\n"); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=84496 @@ -14287,7 +14287,7 @@ "1. ERROR in X.java (at line 5)\n" + " f1.bar = f2.bar;\n" + " ^^^^^^\n" + - "Type mismatch: cannot convert from X.Bar to X.Bar\n" + + "Type mismatch: cannot convert from X.Bar to X.Bar\n" + "----------\n"); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=84496 @@ -14312,7 +14312,7 @@ "1. ERROR in X.java (at line 4)\n" + " f1.bar = f1.bar;\n" + " ^^^^^^\n" + - "Type mismatch: cannot convert from X.Bar to X.Bar\n" + + "Type mismatch: cannot convert from X.Bar to X.Bar\n" + "----------\n"); } public void test0490() { @@ -14335,7 +14335,7 @@ "1. ERROR in X.java (at line 5)\n" + " lhs.t = rhs.t;\n" + " ^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? to capture-of ?\n" + + "Type mismatch: cannot convert from capture#4-of ? to capture#3-of ?\n" + "----------\n"); } @@ -14375,32 +14375,32 @@ "1. ERROR in X.java (at line 5)\n" + " lhs.t = rhs.t;\n" + " ^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? to capture-of ?\n" + + "Type mismatch: cannot convert from capture#4-of ? to capture#3-of ?\n" + "----------\n" + "2. ERROR in X.java (at line 12)\n" + " lhs = rhs;\n" + " ^^^\n" + - "Type mismatch: cannot convert from X to X\n" + + "Type mismatch: cannot convert from X to X\n" + "----------\n" + "3. ERROR in X.java (at line 17)\n" + " lhs.t = rhs.t;\n" + " ^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? extends Number to capture-of ? extends Number\n" + + "Type mismatch: cannot convert from capture#14-of ? extends Number to capture#13-of ? extends Number\n" + "----------\n" + "4. ERROR in X.java (at line 20)\n" + " lhs = rhs;\n" + " ^^^\n" + - "Type mismatch: cannot convert from X to X\n" + + "Type mismatch: cannot convert from X to X\n" + "----------\n" + "5. ERROR in X.java (at line 21)\n" + " lhs.t = rhs.t;\n" + " ^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? super Number to capture-of ? extends Number\n" + + "Type mismatch: cannot convert from capture#18-of ? super Number to capture#17-of ? extends Number\n" + "----------\n" + "6. ERROR in X.java (at line 25)\n" + " lhs.t = rhs.t;\n" + " ^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? super Number to capture-of ? super Number\n" + + "Type mismatch: cannot convert from capture#22-of ? super Number to capture#21-of ? super Number\n" + "----------\n"); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=81576 @@ -16543,12 +16543,12 @@ "1. ERROR in X.java (at line 18)\n" + " lhs = rhs; // cannot convert\n" + " ^^^\n" + - "Type mismatch: cannot convert from X to X\n" + + "Type mismatch: cannot convert from X to X\n" + "----------\n" + "2. ERROR in X.java (at line 21)\n" + " lhs = rhs; // cannot convert\n" + " ^^^\n" + - "Type mismatch: cannot convert from X to X2\n" + + "Type mismatch: cannot convert from X to X2\n" + "----------\n" + "3. ERROR in X.java (at line 29)\n" + " void foo(X xs) {}\n" + @@ -16627,7 +16627,7 @@ "1. WARNING in X.java (at line 9)\n" + " Object o = (DC) (DA) null;\n" + " ^^^^^^^^^^^^^^^^^^^^\n" + - "Unnecessary cast from DA to DC\n" + + "Unnecessary cast from DA to DC\n" + "----------\n" + "2. WARNING in X.java (at line 9)\n" + " Object o = (DC) (DA) null;\n" + @@ -16675,7 +16675,7 @@ "1. WARNING in X.java (at line 6)\n" + " X foo = (X)param;\n" + " ^^^^^^^^^^^\n" + - "Type safety: The cast from X to X is actually checking against the erased type X\n" + + "Type safety: The cast from X to X is actually checking against the erased type X\n" + "----------\n" + "2. ERROR in X.java (at line 8)\n" + " Zork z;\n" + @@ -16784,12 +16784,12 @@ "1. WARNING in X.java (at line 8)\n" + " Object o1 = (X) xo;\n" + " ^^^^^^^^^^^^^^\n" + - "Type safety: The cast from X to X is actually checking against the erased type X\n" + + "Type safety: The cast from X to X is actually checking against the erased type X\n" + "----------\n" + "2. WARNING in X.java (at line 8)\n" + " Object o1 = (X) xo;\n" + " ^^^^^^^^^^^^^^\n" + - "Unnecessary cast from X to X\n" + + "Unnecessary cast from X to X\n" + "----------\n" + "3. WARNING in X.java (at line 9)\n" + " Object o2 = (X) xs;\n" + @@ -16799,7 +16799,7 @@ "4. WARNING in X.java (at line 10)\n" + " Object o3 = (X2) xo;\n" + " ^^^^^^^\n" + - "Unnecessary cast from X to X2\n" + + "Unnecessary cast from X to X2\n" + "----------\n" + "5. WARNING in X.java (at line 11)\n" + " Object o4 = (X) x2;\n" + @@ -16809,12 +16809,12 @@ "6. WARNING in X.java (at line 12)\n" + " Object o5 = (X3) xo;\n" + " ^^^^^^^^^^^^^^^\n" + - "Type safety: The cast from X to X3 is actually checking against the erased type X3\n" + + "Type safety: The cast from X to X3 is actually checking against the erased type X3\n" + "----------\n" + "7. WARNING in X.java (at line 12)\n" + " Object o5 = (X3) xo;\n" + " ^^^^^^^^^^^^^^^\n" + - "Unnecessary cast from X to X3\n" + + "Unnecessary cast from X to X3\n" + "----------\n" + "8. ERROR in X.java (at line 18)\n" + " Zork z;\n" + @@ -16841,17 +16841,17 @@ "1. ERROR in X.java (at line 6)\n" + " xu = xn;\n" + " ^^\n" + - "Type mismatch: cannot convert from X to X\n" + + "Type mismatch: cannot convert from X to X\n" + "----------\n" + "2. ERROR in X.java (at line 7)\n" + " xu.u = xn.u; // ko\n" + " ^^^^\n" + - "Type mismatch: cannot convert from capture-of ? extends Number to capture-of ? extends U\n" + + "Type mismatch: cannot convert from capture#6-of ? extends Number to capture#5-of ? extends U\n" + "----------\n" + "3. ERROR in X.java (at line 8)\n" + " xn.u = xu.u; // ko\n" + " ^^^^\n" + - "Type mismatch: cannot convert from capture-of ? extends U to capture-of ? extends Number\n" + + "Type mismatch: cannot convert from capture#8-of ? extends U to capture#7-of ? extends Number\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=87273 @@ -17353,7 +17353,7 @@ "3. WARNING in X.java (at line 8)\n" + " doWithEnumClass((Class) cl);\n" + " ^^^^^^^^^^^^^^^^\n" + - "Type safety: The cast from Class to Class is actually checking against the erased type Class\n" + + "Type safety: The cast from Class to Class is actually checking against the erased type Class\n" + "----------\n" + "4. WARNING in X.java (at line 8)\n" + " doWithEnumClass((Class) cl);\n" + @@ -17418,7 +17418,7 @@ "1. ERROR in X.java (at line 4)\n" + " (f1).bar = (f1).bar;\n" + " ^^^^^^^^\n" + - "Type mismatch: cannot convert from X.Bar to X.Bar\n" + + "Type mismatch: cannot convert from X.Bar to X.Bar\n" + "----------\n"); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=84496 - variation with single ref @@ -17461,7 +17461,7 @@ "1. ERROR in X.java (at line 4)\n" + " (f1).bar = f1.bar;\n" + " ^^^^^^\n" + - "Type mismatch: cannot convert from X.Bar to X.Bar\n" + + "Type mismatch: cannot convert from X.Bar to X.Bar\n" + "----------\n"); } // check array bound for wildcard @@ -17498,7 +17498,7 @@ "1. ERROR in X.java (at line 3)\n" + " int[] ints = box.get();\n" + " ^^^^^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? super int[] to int[]\n" + + "Type mismatch: cannot convert from capture#1-of ? super int[] to int[]\n" + "----------\n"); } // check array bound for wildcard @@ -17519,7 +17519,7 @@ "1. ERROR in X.java (at line 3)\n" + " int[] ints = box.get();\n" + " ^^^^^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? to int[]\n" + + "Type mismatch: cannot convert from capture#1-of ? to int[]\n" + "----------\n"); } @@ -17545,7 +17545,7 @@ "1. ERROR in X.java (at line 3)\n" + " f1.bar = f1.bar;\n" + " ^^^^^^\n" + - "Type mismatch: cannot convert from Bar to Bar\n" + + "Type mismatch: cannot convert from Bar to Bar\n" + "----------\n"); } @@ -17637,17 +17637,17 @@ " }\n" + "}\n" }, - "----------\n" + - "1. ERROR in X.java (at line 18)\n" + - " untypedList.addAll(untypedList2);\n" + - " ^^^^^^\n" + - "The method addAll(Collection) in the type List is not applicable for the arguments (List)\n" + - "----------\n" + - "2. ERROR in X.java (at line 22)\n" + - " Logger.log(\"Test_Lists.main: s: \" + s);\n" + - " ^^^^^^\n" + - "Logger cannot be resolved\n" + - "----------\n"); + "----------\n" + + "1. ERROR in X.java (at line 18)\n" + + " untypedList.addAll(untypedList2);\n" + + " ^^^^^^\n" + + "The method addAll(Collection) in the type List is not applicable for the arguments (List)\n" + + "----------\n" + + "2. ERROR in X.java (at line 22)\n" + + " Logger.log(\"Test_Lists.main: s: \" + s);\n" + + " ^^^^^^\n" + + "Logger cannot be resolved\n" + + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=90881 @@ -17775,12 +17775,12 @@ " }\n" + "}\n", }, - "----------\n" + - "1. ERROR in X.java (at line 7)\n" + - " target.addAll(source);\n" + - " ^^^^^^\n" + - "The method addAll(Collection) in the type List is not applicable for the arguments (List)\n" + - "----------\n"); + "----------\n" + + "1. ERROR in X.java (at line 7)\n" + + " target.addAll(source);\n" + + " ^^^^^^\n" + + "The method addAll(Collection) in the type List is not applicable for the arguments (List)\n" + + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=85281 - variation @@ -17800,11 +17800,11 @@ " } \n" + "}\n", }, - "----------\n" + + "----------\n" + "1. ERROR in X.java (at line 9)\n" + " Class superSup2 = ext.getSuperclass();\n" + " ^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Class to Class\n" + + "Type mismatch: cannot convert from Class to Class\n" + "----------\n"); } @@ -17897,11 +17897,11 @@ " }\n" + "}\n", }, - "----------\n" + + "----------\n" + "1. ERROR in X.java (at line 11)\n" + " Iterator> it = map.entrySet().iterator();\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Iterator> to Iterator>\n" + + "Type mismatch: cannot convert from Iterator> to Iterator>\n" + "----------\n"); } public void test0595() { @@ -17926,11 +17926,11 @@ " }\n" + "}\n", }, - "----------\n" + + "----------\n" + "1. ERROR in X.java (at line 11)\n" + " Iterator> it = map.entrySet().iterator();\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Iterator> to Iterator>\n" + + "Type mismatch: cannot convert from Iterator> to Iterator>\n" + "----------\n"); } public void test0596() { @@ -17968,11 +17968,11 @@ " F second;\n" + "}\n", }, - "----------\n" + + "----------\n" + "1. ERROR in X.java (at line 6)\n" + " x.m().first = x.m().second;\n" + " ^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from capture-of ? to capture-of ?\n" + + "Type mismatch: cannot convert from capture#2-of ? to capture#1-of ?\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=90879 @@ -18146,12 +18146,12 @@ "abstract class Values {\n" + "}\n", }, - "----------\n" + - "1. ERROR in X.java (at line 4)\n" + - " return select(box.getValues());\n" + - " ^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Values to Values\n" + - "----------\n"); + "----------\n" + + "1. ERROR in X.java (at line 4)\n" + + " return select(box.getValues());\n" + + " ^^^^^^^^^^^^^^^^^^^^^^^\n" + + "Type mismatch: cannot convert from Values to Values\n" + + "----------\n"); } public void test0602() { this.runNegativeTest( @@ -18170,12 +18170,12 @@ "abstract class Values {\n" + "}\n", }, - "----------\n" + - "1. ERROR in X.java (at line 4)\n" + - " box.getValues()[0] = box.getValues()[1];\n" + - " ^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Values to Values\n" + - "----------\n"); + "----------\n" + + "1. ERROR in X.java (at line 4)\n" + + " box.getValues()[0] = box.getValues()[1];\n" + + " ^^^^^^^^^^^^^^^^^^\n" + + "Type mismatch: cannot convert from Values to Values\n" + + "----------\n"); } public void test0603() { this.runConformTest( @@ -18235,12 +18235,12 @@ "abstract class Values {\n" + "}\n", }, - "----------\n" + - "1. ERROR in X.java (at line 4)\n" + - " box.getValues()[1] = box.getValues()[2];\n" + - " ^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Values to Values\n" + - "----------\n"); + "----------\n" + + "1. ERROR in X.java (at line 4)\n" + + " box.getValues()[1] = box.getValues()[2];\n" + + " ^^^^^^^^^^^^^^^^^^\n" + + "Type mismatch: cannot convert from Values to Values\n" + + "----------\n"); } public void test0606() { this.runNegativeTest( @@ -18264,7 +18264,7 @@ "1. ERROR in X.java (at line 4)\n" + " box.getValues()[1] = (Values) box.getValues()[2];\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Values to Values\n" + + "Type mismatch: cannot convert from Values to Values\n" + "----------\n"); } public void test0607() { @@ -18612,12 +18612,12 @@ " }\n" + "}\n", }, - "----------\n" + - "1. ERROR in X.java (at line 6)\n" + - " s = var;\n" + - " ^^^\n" + - "Type mismatch: cannot convert from ZZZ1.ZZZ2.ZZZ3 to String\n" + - "----------\n"); + "----------\n" + + "1. ERROR in X.java (at line 6)\n" + + " s = var;\n" + + " ^^^\n" + + "Type mismatch: cannot convert from ZZZ1.ZZZ2.ZZZ3 to String\n" + + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=84973 - variation public void test0618() { @@ -18870,11 +18870,11 @@ " }\n" + "}\n", }, - "----------\n" + + "----------\n" + "1. ERROR in X.java (at line 9)\n" + " String s = foo(l1, l2);\n" + " ^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from List> to String\n" + + "Type mismatch: cannot convert from List> to String\n" + "----------\n"); } // check capture for conditional operator @@ -18895,11 +18895,11 @@ " }\n" + "}\n", }, - "----------\n" + + "----------\n" + "1. ERROR in X.java (at line 10)\n" + " String s = l1 != null ? foo(l1, l2) : l3;\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from List to String\n" + + "Type mismatch: cannot convert from List to String\n" + "----------\n"); } // https://bugs.eclipse.org/bugs/show_bug.cgi?id=92556 @@ -18968,7 +18968,7 @@ "1. ERROR in X.java (at line 17)\n" + " arrays.add(a); // Error: The method add(capture-of ? extends Number[]) in the type List is not applicable for the arguments (Number[])\n" + " ^^^\n" + - "The method add(capture-of ? extends Number[]) in the type List is not applicable for the arguments (Number[])\n" + + "The method add(capture#4-of ? extends Number[]) in the type List is not applicable for the arguments (Number[])\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=93044 @@ -18991,7 +18991,7 @@ "1. ERROR in X.java (at line 8)\n" + " System.out.println(Enum.valueOf(c, \"CLASS\"));\n" + " ^^^^^^^\n" + - "Bound mismatch: The generic method valueOf(Class, String) of type Enum is not applicable for the arguments (Class>, String). The inferred type capture-of ? extends Enum is not a valid substitute for the bounded parameter >\n" + + "Bound mismatch: The generic method valueOf(Class, String) of type Enum is not applicable for the arguments (Class>, String). The inferred type capture#1-of ? extends Enum is not a valid substitute for the bounded parameter >\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=92982 @@ -19028,17 +19028,17 @@ "1. ERROR in X.java (at line 12)\n" + " lhs.add(rhs.get(0));\n" + " ^^^\n" + - "The method add(capture-of ? extends Object[]) in the type Vector is not applicable for the arguments (capture-of ? extends Object[])\n" + + "The method add(capture#3-of ? extends Object[]) in the type Vector is not applicable for the arguments (capture#4-of ? extends Object[])\n" + "----------\n" + "2. ERROR in X.java (at line 17)\n" + " lhs.add(rhs.get(0));\n" + " ^^^\n" + - "The method add(capture-of ? super Object[]) in the type Vector is not applicable for the arguments (capture-of ? super Object[])\n" + + "The method add(capture#5-of ? super Object[]) in the type Vector is not applicable for the arguments (capture#6-of ? super Object[])\n" + "----------\n" + "3. ERROR in X.java (at line 22)\n" + " lhs.add(rhs.get(0));\n" + " ^^^\n" + - "The method add(capture-of ? extends Object[]) in the type Vector is not applicable for the arguments (capture-of ? super Object[])\n" + + "The method add(capture#7-of ? extends Object[]) in the type Vector is not applicable for the arguments (capture#8-of ? super Object[])\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=92982 - variation @@ -19876,12 +19876,12 @@ "1. WARNING in X.java (at line 6)\n" + " Object o = (BD) bb;\n" + " ^^^^^^^^^^^^^^^\n" + - "Type safety: The cast from X.BB to X.BD is actually checking against the erased type X.BD\n" + + "Type safety: The cast from X.BB to X.BD is actually checking against the erased type X.BD\n" + "----------\n" + "2. WARNING in X.java (at line 6)\n" + " Object o = (BD) bb;\n" + " ^^^^^^^^^^^^^^^\n" + - "Unnecessary cast from X.BB to X.BD\n" + + "Unnecessary cast from X.BB to X.BD\n" + "----------\n" + "3. ERROR in X.java (at line 8)\n" + " Zork z;\n" + @@ -20037,7 +20037,7 @@ "2. WARNING in X.java (at line 34)\n" + " X fromQueue = (X) queue.remove();\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type safety: The cast from Reference to X is actually checking against the erased type X\n" + + "Type safety: The cast from Reference to X is actually checking against the erased type X\n" + "----------\n"); } public void test0660() { @@ -21169,7 +21169,7 @@ "1. ERROR in X.java (at line 6)\n" + " X x = foo(x1, x2);\n" + " ^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from X to X\n" + + "Type mismatch: cannot convert from X to X\n" + "----------\n"); } public void test0685() { @@ -21189,7 +21189,7 @@ "1. ERROR in X.java (at line 6)\n" + " X x = foo(x1, x2);\n" + " ^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from X to X\n" + + "Type mismatch: cannot convert from X to X\n" + "----------\n"); } // check wildcard bounds wrt variable boundCheck @@ -21312,7 +21312,7 @@ "1. ERROR in X.java (at line 4)\n" + " lr = la;\n" + " ^^\n" + - "Type mismatch: cannot convert from List to List\n" + + "Type mismatch: cannot convert from List to List\n" + "----------\n"); } // check that final class bound is more restrictive @@ -23048,7 +23048,7 @@ "1. ERROR in X.java (at line 4)\n" + " X x2 = x;\n" + " ^\n" + - "Type mismatch: cannot convert from X to X\n" + + "Type mismatch: cannot convert from X to X\n" + "----------\n"); } public void test0752() { @@ -23072,7 +23072,7 @@ "1. ERROR in X.java (at line 7)\n" + " current = current.parent;\n" + " ^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from X>> to X>\n" + + "Type mismatch: cannot convert from X>> to X>\n" + "----------\n"); } public void test0753() { @@ -23106,7 +23106,7 @@ "3. ERROR in X.java (at line 7)\n" + " current = current.parent;\n" + " ^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from X>> to X>\n" + + "Type mismatch: cannot convert from X>> to X>\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=99578 @@ -24158,7 +24158,7 @@ "1. ERROR in X.java (at line 8)\n" + " getLonger(list, set);\n" + " ^^^^^^^^^\n" + - "Bound mismatch: The generic method getLonger(T, T) of type X is not applicable for the arguments (HashSet, ArrayList). The inferred type AbstractCollection&Cloneable&Serializable is not a valid substitute for the bounded parameter >\n" + + "Bound mismatch: The generic method getLonger(T, T) of type X is not applicable for the arguments (HashSet, ArrayList). The inferred type AbstractCollection&Cloneable&Serializable is not a valid substitute for the bounded parameter >\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=103528 - variation @@ -24199,7 +24199,7 @@ "1. ERROR in X.java (at line 8)\n" + " getLonger(list, set);\n" + " ^^^^^^^^^\n" + - "Bound mismatch: The generic method getLonger(T, T) of type X is not applicable for the arguments (HashSet, ArrayList). The inferred type AbstractCollection&Cloneable&Serializable is not a valid substitute for the bounded parameter >\n" + + "Bound mismatch: The generic method getLonger(T, T) of type X is not applicable for the arguments (HashSet, ArrayList). The inferred type AbstractCollection&Cloneable&Serializable is not a valid substitute for the bounded parameter >\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=103994 @@ -24294,7 +24294,7 @@ "2. ERROR in X.java (at line 15)\n" + " isGreater(c1, c2);\n" + " ^^^^^^^^^\n" + - "Bound mismatch: The generic method isGreater(T, T) of type X is not applicable for the arguments (Comparable, Comparable). The inferred type Comparable is not a valid substitute for the bounded parameter >\n" + + "Bound mismatch: The generic method isGreater(T, T) of type X is not applicable for the arguments (Comparable, Comparable). The inferred type Comparable is not a valid substitute for the bounded parameter >\n" + "----------\n" + "3. WARNING in X.java (at line 18)\n" + " Comparable c1= i;\n" + @@ -24546,7 +24546,7 @@ "4. WARNING in X.java (at line 13)\n" + " ref.next = first == null ? ref : first;\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type safety: The expression of type Y needs unchecked conversion to conform to Y\n" + + "Type safety: The expression of type Y needs unchecked conversion to conform to Y\n" + "----------\n" + "5. ERROR in X.java (at line 14)\n" + " String s = first == null ? ref : first;\n" + @@ -24556,7 +24556,7 @@ "6. WARNING in X.java (at line 15)\n" + " ref.next = first2 == null ? ref : first2;\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type safety: The expression of type Y needs unchecked conversion to conform to Y\n" + + "Type safety: The expression of type Y needs unchecked conversion to conform to Y\n" + "----------\n" + "7. WARNING in X.java (at line 18)\n" + " return first == null ? ref : first;\n" + @@ -24689,7 +24689,7 @@ "1. ERROR in X.java (at line 13)\n" + " return true ? superList : superList;\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from ArrayList to ArrayList\n" + + "Type mismatch: cannot convert from ArrayList to ArrayList\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=106865 @@ -24724,12 +24724,12 @@ "1. ERROR in X.java (at line 13)\n" + " y.foo(os);\n" + " ^^^\n" + - "The method foo(capture-of ? extends Object[]) in the type Y is not applicable for the arguments (Object[])\n" + + "The method foo(capture#3-of ? extends Object[]) in the type Y is not applicable for the arguments (Object[])\n" + "----------\n" + "2. ERROR in X.java (at line 16)\n" + " y.foo(c);\n" + " ^^^\n" + - "The method foo(capture-of ? extends Cloneable) in the type Y is not applicable for the arguments (Cloneable)\n" + + "The method foo(capture#4-of ? extends Cloneable) in the type Y is not applicable for the arguments (Cloneable)\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=106936 @@ -26036,7 +26036,7 @@ "1. ERROR in X.java (at line 5)\n" + " bar(l.get(0));\n" + " ^^^\n" + - "The method bar(String) in the type X is not applicable for the arguments (capture-of ? extends List)\n" + + "The method bar(String) in the type X is not applicable for the arguments (capture#1-of ? extends List)\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=111689 @@ -26331,7 +26331,7 @@ "1. ERROR in X.java (at line 7)\n" + " col.add(n);\n" + " ^^^\n" + - "The method add(capture-of ? extends Collection) in the type Collection> is not applicable for the arguments (List)\n" + + "The method add(capture#1-of ? extends Collection) in the type Collection> is not applicable for the arguments (List)\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=106451 @@ -26357,7 +26357,7 @@ "2. WARNING in X.java (at line 5)\n" + " List nums= (List) asList; // correct warning\n" + " ^^^^^^^^^^^^^^^^^^^^^\n" + - "Type safety: The cast from Collection to List is actually checking against the erased type List\n" + + "Type safety: The cast from Collection to List is actually checking against the erased type List\n" + "----------\n" + "3. ERROR in X.java (at line 7)\n" + " Zork z;\n" + @@ -27248,12 +27248,12 @@ " ? uiMap.get(persistentClass)\n" + " : (Class>) uiMap.get(persistentClass);\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Class to Class>\n" + + "Type mismatch: cannot convert from Class to Class>\n" + "----------\n" + "4. WARNING in X.java (at line 12)\n" + " : (Class>) uiMap.get(persistentClass);\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type safety: The cast from Class to Class> is actually checking against the erased type Class\n" + + "Type safety: The cast from Class to Class> is actually checking against the erased type Class\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=119395 - variation @@ -27298,7 +27298,7 @@ "5. ERROR in X.java (at line 10)\n" + " Class> ceco2 = cec; // ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from Class to Class>\n" + + "Type mismatch: cannot convert from Class to Class>\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=119395 - variation @@ -27349,7 +27349,7 @@ "6. WARNING in X.java (at line 7)\n" + " Class c = let.get(0); // ok - unchecked\n" + " ^^^^^^^^^^\n" + - "Type safety: The expression of type capture-of ? extends T needs unchecked conversion to conform to Class\n" + + "Type safety: The expression of type capture#1-of ? extends T needs unchecked conversion to conform to Class\n" + "----------\n" + "7. WARNING in X.java (at line 9)\n" + " void bar3(List lec) {\n" + @@ -27359,7 +27359,7 @@ "8. WARNING in X.java (at line 10)\n" + " Class c = lec.get(0); // ok - unchecked\n" + " ^^^^^^^^^^\n" + - "Type safety: The expression of type capture-of ? extends Class needs unchecked conversion to conform to Class\n" + + "Type safety: The expression of type capture#2-of ? extends Class needs unchecked conversion to conform to Class\n" + "----------\n" + "9. ERROR in X.java (at line 12)\n" + " Zork z;\n" + @@ -27559,17 +27559,17 @@ "1. ERROR in X.java (at line 7)\n" + " String s = getClass();\n" + " ^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Class to String\n" + + "Type mismatch: cannot convert from Class to String\n" + "----------\n" + "2. ERROR in X.java (at line 8)\n" + " return (String) getDefault(getClass());\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Cannot cast from capture-of ? extends X to String\n" + + "Cannot cast from capture#2-of ? extends X to String\n" + "----------\n" + "3. WARNING in X.java (at line 8)\n" + " return (String) getDefault(getClass());\n" + " ^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type safety: Unchecked invocation getDefault(Class) of the generic method getDefault(Class) of type X\n" + + "Type safety: Unchecked invocation getDefault(Class) of the generic method getDefault(Class) of type X\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=125445 @@ -28350,12 +28350,12 @@ "4. ERROR in X.java (at line 13)\n" + " lc1 = lc3; //2 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List> to List\n" + + "Type mismatch: cannot convert from List> to List\n" + "----------\n" + "5. ERROR in X.java (at line 14)\n" + " lc1 = lc4; //3 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List to List\n" + + "Type mismatch: cannot convert from List to List\n" + "----------\n" + "6. ERROR in X.java (at line 15)\n" + " lc2 = lc1; //4 ko\n" + @@ -28365,12 +28365,12 @@ "7. ERROR in X.java (at line 16)\n" + " lc2 = lc3; //5 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List> to List>\n" + + "Type mismatch: cannot convert from List> to List>\n" + "----------\n" + "8. ERROR in X.java (at line 17)\n" + " lc2 = lc4; //6 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List to List>\n" + + "Type mismatch: cannot convert from List to List>\n" + "----------\n" + "9. ERROR in X.java (at line 18)\n" + " lc3 = lc1; //7 ko\n" + @@ -28380,7 +28380,7 @@ "10. ERROR in X.java (at line 20)\n" + " lc3 = lc4; //9 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List to List>\n" + + "Type mismatch: cannot convert from List to List>\n" + "----------\n" + "11. WARNING in X.java (at line 25)\n" + " private final List aList = new ArrayList();\n" + @@ -28447,12 +28447,12 @@ "4. ERROR in X.java (at line 12)\n" + " lc1 = lc3; //2 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List> to List\n" + + "Type mismatch: cannot convert from List> to List\n" + "----------\n" + "5. ERROR in X.java (at line 13)\n" + " lc1 = lc4; //3 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List to List\n" + + "Type mismatch: cannot convert from List to List\n" + "----------\n" + "6. ERROR in X.java (at line 14)\n" + " lc2 = lc1; //4 ko\n" + @@ -28462,12 +28462,12 @@ "7. ERROR in X.java (at line 15)\n" + " lc2 = lc3; //5 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List> to List>\n" + + "Type mismatch: cannot convert from List> to List>\n" + "----------\n" + "8. ERROR in X.java (at line 16)\n" + " lc2 = lc4; //6 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List to List>\n" + + "Type mismatch: cannot convert from List to List>\n" + "----------\n" + "9. ERROR in X.java (at line 21)\n" + " lc4 = lc2; //11 ko\n" + @@ -28477,7 +28477,7 @@ "10. ERROR in X.java (at line 22)\n" + " lc4 = lc3; //12 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List> to List\n" + + "Type mismatch: cannot convert from List> to List\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=127583 - variation @@ -28503,7 +28503,7 @@ "2. ERROR in X.java (at line 6)\n" + " l2 = l1;\n" + " ^^\n" + - "Type mismatch: cannot convert from List[]> to List\n" + + "Type mismatch: cannot convert from List[]> to List\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=127583 - variation @@ -28542,12 +28542,12 @@ "2. ERROR in X.java (at line 9)\n" + " lc1 = lc3; //2 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List[]> to List\n" + + "Type mismatch: cannot convert from List[]> to List\n" + "----------\n" + "3. ERROR in X.java (at line 10)\n" + " lc1 = lc4; //3 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List to List\n" + + "Type mismatch: cannot convert from List to List\n" + "----------\n" + "4. ERROR in X.java (at line 11)\n" + " lc2 = lc1; //4 ko\n" + @@ -28557,12 +28557,12 @@ "5. ERROR in X.java (at line 12)\n" + " lc2 = lc3; //5 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List[]> to List[]>\n" + + "Type mismatch: cannot convert from List[]> to List[]>\n" + "----------\n" + "6. ERROR in X.java (at line 13)\n" + " lc2 = lc4; //6 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List to List[]>\n" + + "Type mismatch: cannot convert from List to List[]>\n" + "----------\n" + "7. ERROR in X.java (at line 14)\n" + " lc3 = lc1; //7 ko\n" + @@ -28572,7 +28572,7 @@ "8. ERROR in X.java (at line 16)\n" + " lc3 = lc4; //9 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List to List[]>\n" + + "Type mismatch: cannot convert from List to List[]>\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=127583 - variation @@ -28611,12 +28611,12 @@ "2. ERROR in X.java (at line 9)\n" + " lc1 = lc3; //2 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List[]> to List\n" + + "Type mismatch: cannot convert from List[]> to List\n" + "----------\n" + "3. ERROR in X.java (at line 10)\n" + " lc1 = lc4; //3 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List to List\n" + + "Type mismatch: cannot convert from List to List\n" + "----------\n" + "4. ERROR in X.java (at line 11)\n" + " lc2 = lc1; //4 ko\n" + @@ -28626,12 +28626,12 @@ "5. ERROR in X.java (at line 12)\n" + " lc2 = lc3; //5 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List[]> to List[]>\n" + + "Type mismatch: cannot convert from List[]> to List[]>\n" + "----------\n" + "6. ERROR in X.java (at line 13)\n" + " lc2 = lc4; //6 ko\n" + " ^^^\n" + - "Type mismatch: cannot convert from List to List[]>\n" + + "Type mismatch: cannot convert from List to List[]>\n" + "----------\n" + "7. ERROR in X.java (at line 18)\n" + " lc4 = lc2; //11 ko\n" + @@ -28641,7 +28641,7 @@ "8. ERROR in X.java (at line 19)\n" + " lc4 = lc3; //12 ko \n" + " ^^^\n" + - "Type mismatch: cannot convert from List[]> to List\n" + + "Type mismatch: cannot convert from List[]> to List\n" + "----------\n"); } @@ -28966,9 +28966,8 @@ "1. ERROR in X.java (at line 6)\n" + " X.a(t.getClass());\n" + " ^\n" + - "The method a(Class>) in the type X is not applicable for the arguments (Class)\n" + - "----------\n" - ); + "The method a(Class>) in the type X is not applicable for the arguments (Class)\n" + + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=129190 public void test0924() { @@ -29092,7 +29091,7 @@ "1. ERROR in X.java (at line 6)\n" + " RESULT = NonTerminalSourcePart.create(Tuple.create(true, t.value().fst()));\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from NonTerminalSourcePart> to NonTerminalSourcePart>\n" + + "Type mismatch: cannot convert from NonTerminalSourcePart> to NonTerminalSourcePart>\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=129261 - variation @@ -29133,27 +29132,27 @@ "1. ERROR in X.java (at line 6)\n" + " RESULT = Collections.singletonList(Collections.singletonList(lst.get(0)));\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from List> to List>\n" + + "Type mismatch: cannot convert from List> to List>\n" + "----------\n" + "2. ERROR in X.java (at line 11)\n" + " RESULT = Collections.singletonList(Collections.singletonList(lst.get(0)));\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from List> to List>\n" + + "Type mismatch: cannot convert from List> to List>\n" + "----------\n" + "3. ERROR in X.java (at line 16)\n" + " RESULT = Collections.singletonList(Collections.singletonList(lst.get(0)));\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from List> to List>\n" + + "Type mismatch: cannot convert from List> to List>\n" + "----------\n" + "4. ERROR in X.java (at line 20)\n" + " RESULT = lst;\n" + " ^^^\n" + - "Type mismatch: cannot convert from List to List\n" + + "Type mismatch: cannot convert from List to List\n" + "----------\n" + "5. ERROR in X.java (at line 21)\n" + " RESULT = Collections.singletonList(lst.get(0));\n" + " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from List to List\n" + + "Type mismatch: cannot convert from List to List\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=129261 - variation @@ -29174,7 +29173,7 @@ "1. ERROR in X.java (at line 6)\n" + " x1.addAll(x2);\n" + " ^^^^^^\n" + - "The method addAll(Collection) in the type List is not applicable for the arguments (List)\n" + + "The method addAll(Collection) in the type List is not applicable for the arguments (List)\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=117119 @@ -29208,12 +29207,12 @@ "2. WARNING in X.java (at line 7)\n" + " final Collection test = allOf(enumType);\n" + " ^^^^^^^^^^^^^^^\n" + - "Type safety: Unchecked invocation allOf(Class) of the generic method allOf(Class) of type X\n" + + "Type safety: Unchecked invocation allOf(Class) of the generic method allOf(Class) of type X\n" + "----------\n" + "3. ERROR in X.java (at line 7)\n" + " final Collection test = allOf(enumType);\n" + " ^^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Collection to Collection\n" + + "Type mismatch: cannot convert from Collection to Collection\n" + "----------\n" + "4. WARNING in X.java (at line 9)\n" + " Collection colType = null;\n" + @@ -29223,7 +29222,7 @@ "5. ERROR in X.java (at line 10)\n" + " final Collection test2 = colType;\n" + " ^^^^^^^\n" + - "Type mismatch: cannot convert from Collection to Collection\n" + + "Type mismatch: cannot convert from Collection to Collection\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=119238 @@ -29780,7 +29779,7 @@ "1. ERROR in X.java (at line 4)\n" + " Box bx = box(b.element);\n" + " ^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Box to Box\n" + + "Type mismatch: cannot convert from Box to Box\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=129261 - variation @@ -31029,7 +31028,7 @@ "1. ERROR in X.java (at line 7)\n" + " l1.addAll(l2);\n" + " ^^^^^^\n" + - "The method addAll(Collection) in the type List is not applicable for the arguments (List)\n" + + "The method addAll(Collection) in the type List is not applicable for the arguments (List)\n" + "----------\n"); } // generic inner class within a non generic one @@ -31831,7 +31830,7 @@ "1. ERROR in GenericsProblem.java (at line 5)\n" + " Class cl = val.getClass();\n" + " ^^^^^^^^^^^^^^\n" + - "Type mismatch: cannot convert from Class to Class\n" + + "Type mismatch: cannot convert from Class to Class\n" + "----------\n"); } //https://bugs.eclipse.org/bugs/show_bug.cgi?id=148061 @@ -32337,4 +32336,24 @@ "The method deepToString(T[]) in the type X is not applicable for the arguments (double[])\n" + "----------\n"); } +//https://bugs.eclipse.org/bugs/show_bug.cgi?id=149573 +public void test1020() { + this.runNegativeTest( + new String[] { + "X.java", + "import java.util.List;\n" + + "\n" + + "public class X {\n" + + " void foo(List l1, List l2) {\n" + + " l1.add(l2.get(0));\n" + + " }\n" + + "}\n", // ================= + }, + "----------\n" + + "1. ERROR in X.java (at line 5)\n" + + " l1.add(l2.get(0));\n" + + " ^^^\n" + + "The method add(capture#1-of ? extends Exception) in the type List is not applicable for the arguments (capture#2-of ? extends Exception)\n" + + "----------\n"); +} } \ No newline at end of file Index: src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java,v retrieving revision 1.67 diff -u -r1.67 BatchCompilerTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 30 Jun 2006 06:17:48 -0000 1.67 +++ src/org/eclipse/jdt/core/tests/compiler/regression/BatchCompilerTest.java 6 Jul 2006 11:04:43 -0000 @@ -2043,7 +2043,7 @@ "5. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/p/Z.java (at line 58)\n" + " final XX l1 = (XX) i.getKey();\n" + " ^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type safety: The cast from X.XX to X.XX is actually checking against the erased type X.XX\n" + + "Type safety: The cast from X.XX to X.XX is actually checking against the erased type X.XX\n" + "----------\n" + "5 problems (5 warnings)", true); @@ -2208,7 +2208,7 @@ "5. WARNING in ---OUTPUT_DIR_PLACEHOLDER---/p/Z.java (at line 58)\n" + " final XX l1 = (XX) i.getKey();\n" + " ^^^^^^^^^^^^^^^^^^^^^^\n" + - "Type safety: The cast from X.XX to X.XX is actually checking against the erased type X.XX\n" + + "Type safety: The cast from X.XX to X.XX is actually checking against the erased type X.XX\n" + "----------\n" + "5 problems (5 warnings)", false); Index: src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java,v retrieving revision 1.97 diff -u -r1.97 AutoBoxingTest.java --- src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java 8 Jun 2006 13:07:58 -0000 1.97 +++ src/org/eclipse/jdt/core/tests/compiler/regression/AutoBoxingTest.java 6 Jul 2006 11:04:34 -0000 @@ -3088,7 +3088,7 @@ "3. WARNING in X.java (at line 20)\n" + " final long t4 = obj.getVal();\n" + " ^^^^^^^^^^^^\n" + - "The expression of type capture-of ? extends Long is unboxed into long\n" + + "The expression of type capture#2-of ? extends Long is unboxed into long\n" + "----------\n" + "4. WARNING in X.java (at line 24)\n" + " void proc2(Cla obj) {\n" +