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/Wildcard.java (+2 lines)
Lines 90-95 Link Here
90
		if (this.bound != null) {
90
		if (this.bound != null) {
91
			this.bound.resolveType(scope, checkBounds);
91
			this.bound.resolveType(scope, checkBounds);
92
		}
92
		}
93
		scope.problemReporter().illegalUsageOfWildcard(this);
93
		return null;
94
		return null;
94
	}
95
	}
95
	// only invoked for improving resilience when unable to bind generic type from parameterized reference
96
	// only invoked for improving resilience when unable to bind generic type from parameterized reference
Lines 97-102 Link Here
97
		if (this.bound != null) {
98
		if (this.bound != null) {
98
			this.bound.resolveType(scope);
99
			this.bound.resolveType(scope);
99
		}
100
		}
101
		scope.problemReporter().illegalUsageOfWildcard(this);
100
		return null;
102
		return null;
101
	}
103
	}
102
	public TypeBinding resolveTypeArgument(BlockScope blockScope, ReferenceBinding genericType, int rank) {
104
	public TypeBinding resolveTypeArgument(BlockScope blockScope, ReferenceBinding genericType, int rank) {
(-)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