### Eclipse Workspace Patch 1.0 #P org.eclipse.jdt.core Index: compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java,v retrieving revision 1.79 diff -u -r1.79 QualifiedAllocationExpression.java --- compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 28 Oct 2006 04:11:27 -0000 1.79 +++ compiler/org/eclipse/jdt/internal/compiler/ast/QualifiedAllocationExpression.java 16 Feb 2007 14:39:23 -0000 @@ -272,8 +272,14 @@ int length = this.typeArguments.length; this.genericTypeArguments = new TypeBinding[length]; for (int i = 0; i < length; i++) { - TypeBinding argType = this.typeArguments[i].resolveType(scope, true /* check bounds*/); - if (argType == null) return null; // error already reported + TypeReference typeReference = this.typeArguments[i]; + TypeBinding argType = typeReference.resolveType(scope, true /* check bounds*/); + if (argType == null) { + if (typeReference instanceof Wildcard) { + scope.problemReporter().illegalUsageOfWildcard(typeReference); + } + return null; // error already reported + } this.genericTypeArguments[i] = argType; } } Index: compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java,v retrieving revision 1.65 diff -u -r1.65 AllocationExpression.java --- compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java 28 Oct 2006 04:11:27 -0000 1.65 +++ compiler/org/eclipse/jdt/internal/compiler/ast/AllocationExpression.java 16 Feb 2007 14:39:23 -0000 @@ -252,9 +252,13 @@ boolean argHasError = false; // typeChecks all arguments this.genericTypeArguments = new TypeBinding[length]; for (int i = 0; i < length; i++) { - if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, true /* check bounds*/)) == null) { + TypeReference typeReference = this.typeArguments[i]; + if ((this.genericTypeArguments[i] = typeReference.resolveType(scope, true /* check bounds*/)) == null) { argHasError = true; } + if (argHasError && typeReference instanceof Wildcard) { + scope.problemReporter().illegalUsageOfWildcard(typeReference); + } } if (argHasError) { return null; Index: compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java,v retrieving revision 1.55 diff -u -r1.55 ExplicitConstructorCall.java --- compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java 28 Mar 2006 20:29:56 -0000 1.55 +++ compiler/org/eclipse/jdt/internal/compiler/ast/ExplicitConstructorCall.java 16 Feb 2007 14:39:23 -0000 @@ -294,9 +294,13 @@ boolean argHasError = false; // typeChecks all arguments this.genericTypeArguments = new TypeBinding[length]; for (int i = 0; i < length; i++) { - if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, true /* check bounds*/)) == null) { + TypeReference typeReference = this.typeArguments[i]; + if ((this.genericTypeArguments[i] = typeReference.resolveType(scope, true /* check bounds*/)) == null) { argHasError = true; } + if (argHasError && typeReference instanceof Wildcard) { + scope.problemReporter().illegalUsageOfWildcard(typeReference); + } } if (argHasError) { return;