Boo.Lang.Compiler.TypeSystem.GenericParameterInferrer.InferGenericParameter C# (CSharp) Method

InferGenericParameter() private method

private InferGenericParameter ( IGenericParameter formalType, IType actualType, Inference inference ) : bool
formalType IGenericParameter
actualType IType
inference Inference
return bool
        private bool InferGenericParameter(IGenericParameter formalType, IType actualType, Inference inference)
        {
            if (_inferredTypes.ContainsKey(formalType))
            {
                InferredType inferredType = _inferredTypes[formalType];
                if ((inference & Inference.AllowContravariance) != Inference.AllowContravariance)
                {
                    inferredType.ApplyLowerBound(actualType);
                }
                if ((inference & Inference.AllowCovariance) != Inference.AllowCovariance)
                {
                    inferredType.ApplyUpperBound(actualType);
                }
            }

            return true;
        }