final ConversionType conversionType = getNumericConversion(castType, opType, operand);
final ConversionType valueToInner = getNumericConversion(innerCastType, innerOperandType, innerOperand); final ConversionType outerToInner = getNumericConversion(innerCastType, topCastType, innerOperand); final ConversionType valueToOuter = getNumericConversion(topCastType, innerOperandType, innerOperand);
/** * Determines the conversion type, taking lossiness into consideration for numeric conversions. * Returns {@link ConversionType#NONE} if a determination could not be made. */ private ConversionType getConversion( @NotNull final TypeReference target, @NotNull final TypeReference source, @Nullable final Expression value) { final TypeReference unboxedTarget = unbox(target); final TypeReference unboxedSource = unbox(source); if (unboxedTarget.getSimpleType().isNumeric() && unboxedSource.getSimpleType().isNumeric()) { return getNumericConversion(target, source, value); } return MetadataHelper.getConversionType(target, source); }