View | Details | Raw Unified | Return to bug 172189 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/problem/messages.properties (+1 lines)
Lines 480-485 Link Here
480
575 = Illegal qualified access from the type parameter {0}
480
575 = Illegal qualified access from the type parameter {0}
481
576 = The nested type {0} is hiding the type parameter {1} of type {2}
481
576 = The nested type {0} is hiding the type parameter {1} of type {2}
482
577 = The nested type {0} is hiding the type parameter {1} of the generic method {2}({3}) of type {4}
482
577 = The nested type {0} is hiding the type parameter {1} of the generic method {2}({3}) of type {4}
483
578 = Wildcard is not allowed at this location
483
484
484
### FOREACH
485
### FOREACH
485
580 = Type mismatch: cannot convert from element type {0} to {1}
486
580 = Type mismatch: cannot convert from element type {0} to {1}
(-)compiler/org/eclipse/jdt/internal/compiler/problem/ProblemReporter.java (+8 lines)
Lines 3471-3476 Link Here
3471
		argument.type.sourceStart,
3471
		argument.type.sourceStart,
3472
		argument.sourceEnd);
3472
		argument.sourceEnd);
3473
}
3473
}
3474
public void illegalUsageOfWildcard(TypeReference wildcard) {
3475
	this.handle(
3476
		IProblem.InvalidUsageOfWildcard,
3477
		NoArgument, 
3478
		NoArgument, 
3479
		wildcard.sourceStart,
3480
		wildcard.sourceEnd);
3481
}
3474
public void isClassPathCorrect(char[][] wellKnownTypeName, CompilationUnitDeclaration compUnitDecl, Object location) {
3482
public void isClassPathCorrect(char[][] wellKnownTypeName, CompilationUnitDeclaration compUnitDecl, Object location) {
3475
	this.referenceContext = compUnitDecl;
3483
	this.referenceContext = compUnitDecl;
3476
	String[] arguments = new String[] {CharOperation.toString(wellKnownTypeName)};
3484
	String[] arguments = new String[] {CharOperation.toString(wellKnownTypeName)};
(-)compiler/org/eclipse/jdt/internal/compiler/ast/MessageSend.java (-1 / +5 lines)
Lines 329-337 Link Here
329
		boolean argHasError = false; // typeChecks all arguments
329
		boolean argHasError = false; // typeChecks all arguments
330
		this.genericTypeArguments = new TypeBinding[length];
330
		this.genericTypeArguments = new TypeBinding[length];
331
		for (int i = 0; i < length; i++) {
331
		for (int i = 0; i < length; i++) {
332
			if ((this.genericTypeArguments[i] = this.typeArguments[i].resolveType(scope, true /* check bounds*/)) == null) {
332
			TypeReference typeReference = this.typeArguments[i];
333
			if ((this.genericTypeArguments[i] = typeReference.resolveType(scope, true /* check bounds*/)) == null) {
333
				argHasError = true;
334
				argHasError = true;
334
			}
335
			}
336
			if (argHasError && typeReference instanceof Wildcard) {
337
				scope.problemReporter().illegalUsageOfWildcard(typeReference);
338
			}
335
		}
339
		}
336
		if (argHasError) {
340
		if (argHasError) {
337
			return null;
341
			return null;
(-)compiler/org/eclipse/jdt/core/compiler/IProblem.java (+2 lines)
Lines 1038-1043 Link Here
1038
	int TypeHidingTypeParameterFromType = TypeRelated + 576;
1038
	int TypeHidingTypeParameterFromType = TypeRelated + 576;
1039
	/** @since 3.3 */
1039
	/** @since 3.3 */
1040
	int TypeHidingTypeParameterFromMethod = TypeRelated + 577;
1040
	int TypeHidingTypeParameterFromMethod = TypeRelated + 577;
1041
    /** @since 3.3 */
1042
    int InvalidUsageOfWildcard = Syntax + Internal + 578;
1041
	
1043
	
1042
	/**
1044
	/**
1043
	 * Foreach
1045
	 * Foreach

Return to bug 172189