Boo.Lang.Compiler.TypeSystem.TypeSystemServices.CanBeReachedByPromotionImpl C# (CSharp) Method

CanBeReachedByPromotionImpl() private method

private CanBeReachedByPromotionImpl ( IType expectedType, IType actualType ) : bool
expectedType IType
actualType IType
return bool
        private bool CanBeReachedByPromotionImpl(IType expectedType, IType actualType)
        {
            if (IsNullable(expectedType) && actualType.IsNull())
                return true;
            if (IsIntegerNumber(actualType) && CanBeExplicitlyCastToPrimitiveNumber(expectedType))
                return true;
            if (IsIntegerNumber(expectedType) && CanBeExplicitlyCastToPrimitiveNumber(actualType))
                return true;
            return (expectedType.IsValueType && IsNumber(expectedType) && IsNumber(actualType));
        }
TypeSystemServices