Bug 96926 [quick fix] Change method return type quick fix gives invalid proposal for wildcard types
Against I20050527-0010: Code: void a() { ArrayList<? extends Number> b = null; return b.get(0); } Ask for a quick fix on the compile error. Three things happen: 1) BAD: The quick fix is entitled "Change method return type to '? extends Number'". 2) GOOD: The correct return type, Number, is shown originally. 3) BAD: However, the top completion proposal, and the one chosen if the user simply hits return, is "? extends Number", which creates a compile error.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ASTResolving.java
}
		if (type.isCapture()) {
			type= type.getWildcard();
		}
		
		if (type.isWildcardType()) {
			if (noWildcards) {
				return false;
			}
			if (type.getBound() != null) {
				return isUseableTypeInContext(type.getBound(), context, noWildcards);
			}
		}
		return true;
	}
		
	/**
	 * Use this method before creating a type for a wildcard. Either to assign a wildcard to a new type or for a type to be assigned.
	 * @param wildcardType the wildcard type to normalize
	 * @param isBindingToAssign If true, then a new receiver type is searched (X x= s), else the type of a sender (R r= x)
	 * @return Returns the normalized binding or null when only the 'null' binding 
	 */
	public static ITypeBinding normalizeWildcardType(ITypeBinding wildcardType, boolean isBindingToAssign, AST ast) {
		ITypeBinding bound= wildcardType.getBound();
		if (isBindingToAssign) {
			if (bound == null || !wildcardType.isUpperbound()) {
				return ast.resolveWellKnownType("java.lang.Object"); 
			}
		} else {
			if (bound == null || wildcardType.isUpperbound()) {