private bool Infer(IType formalType, IType actualType, Inference inference)
{
// Skip unspecified actual types
if (actualType == null) return true;
if (formalType is IGenericParameter)
{
return InferGenericParameter((IGenericParameter)formalType, actualType, inference);
}
if (formalType is ICallableType)
{
return InferCallableType((ICallableType)formalType, actualType, inference);
}
if (formalType.ConstructedInfo != null)
{
return InferConstructedType(formalType, actualType, inference);
}
if (formalType is IArrayType)
{
return InferArrayType((IArrayType)formalType, actualType, inference);
}
return InferSimpleType(formalType, actualType, inference);
}