View | Details | Raw Unified | Return to bug 82504
Collapse All | Expand All

(-)Expression.java (-1 / +6 lines)
Lines 297-303 Link Here
297
					exprElementType,
297
					exprElementType,
298
					expression);
298
					expression);
299
			} else if (castType.isTypeVariable()) {
299
			} else if (castType.isTypeVariable()) {
300
				TypeBinding match = ((ReferenceBinding)expressionType).findSuperTypeErasingTo((ReferenceBinding)castType);
300
				TypeBinding leafType = ((ArrayBinding) expressionType).leafComponentType();
301
				if (leafType.isBaseType()) {
302
					reportIllegalCast(scope, castType, expressionType);
303
					return false;
304
				}
305
				TypeBinding match = ((ReferenceBinding)leafType).findSuperTypeErasingTo((ReferenceBinding)castType);
301
				if (match == null) {
306
				if (match == null) {
302
					checkUnsafeCast(scope, castType, expressionType, match, true);
307
					checkUnsafeCast(scope, castType, expressionType, match, true);
303
				}
308
				}

Return to bug 82504