Index: compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties,v --- compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 23 Nov 2006 17:27:18 -0000 1.215 +++ compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties 30 Jan 2007 18:19:15 -0000 @@ -480,6 +480,7 @@ 575 = Illegal qualified access from the type parameter {0} 576 = The nested type {0} is hiding the type parameter {1} of type {2} 577 = The nested type {0} is hiding the type parameter {1} of the generic method {2}({3}) of type {4} +578 = Wildcard is not allowed at this location ### FOREACH 580 = Type mismatch: cannot convert from element type {0} to {1} Index: compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java,v --- compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 26 Jan 2007 12:18:41 -0000 1.337 +++ compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java 30 Jan 2007 18:19:15 -0000 @@ -3471,6 +3471,14 @@ argument.type.sourceStart, argument.sourceEnd); } +public void illegalUsageOfWildcard(TypeReference wildcard) { + this.handle( + IProblem.InvalidUsageOfWildcard, + NoArgument, + NoArgument, + wildcard.sourceStart, + wildcard.sourceEnd); +} public void isClassPathCorrect(char[][] wellKnownTypeName, CompilationUnitDeclaration compUnitDecl, Object location) { this.referenceContext = compUnitDecl; String[] arguments = new String[] {CharOperation.toString(wellKnownTypeName)}; Index: compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java,v --- compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java 26 Sep 2006 16:28:34 -0000 1.7 +++ compiler/org/eclipse/jdt/internal/compiler/ast/Wildcard.java 30 Jan 2007 18:19:15 -0000 @@ -90,6 +90,7 @@ if (this.bound != null) { this.bound.resolveType(scope, checkBounds); } + scope.problemReporter().illegalUsageOfWildcard(this); return null; } // only invoked for improving resilience when unable to bind generic type from parameterized reference @@ -97,6 +98,7 @@ if (this.bound != null) { this.bound.resolveType(scope); } + scope.problemReporter().illegalUsageOfWildcard(this); return null; } public TypeBinding resolveTypeArgument(BlockScope blockScope, ReferenceBinding genericType, int rank) { Index: compiler/org/eclipse/jdt/core/compiler/IProblem.java =================================================================== RCS file: /cvsroot/eclipse/org.eclipse.jdt.core/compiler/org/eclipse/jdt/core/compiler/IProblem.java,v --- compiler/org/eclipse/jdt/core/compiler/IProblem.java 23 Nov 2006 17:27:18 -0000 1.185 +++ compiler/org/eclipse/jdt/core/compiler/IProblem.java 30 Jan 2007 18:19:15 -0000 @@ -1038,6 +1038,8 @@ int TypeHidingTypeParameterFromType = TypeRelated + 576; /** @since 3.3 */ int TypeHidingTypeParameterFromMethod = TypeRelated + 577; + /** @since 3.3 */ + int InvalidUsageOfWildcard = Syntax + Internal + 578; /** * Foreach