Boo.Lang.Compiler.Steps.ProcessMethodBodies.InferGenericMethodInvocation C# (CSharp) Метод

InferGenericMethodInvocation() приватный Метод

private InferGenericMethodInvocation ( MethodInvocationExpression node, IMethod targetMethod ) : IMethod
node Boo.Lang.Compiler.Ast.MethodInvocationExpression
targetMethod IMethod
Результат IMethod
        private IMethod InferGenericMethodInvocation(MethodInvocationExpression node, IMethod targetMethod)
        {
            if (targetMethod.GenericInfo == null) return targetMethod;

            GenericParameterInferrer inferrer = new GenericParameterInferrer(Context, targetMethod, node.Arguments);
            inferrer.ResolveClosure += ProcessClosureInMethodInvocation;
            if (!inferrer.Run())
            {
                CannotInferGenericMethodArguments(node, targetMethod);
                return null;
            }

            IType[] inferredTypeArguments = inferrer.GetInferredTypes();
            if (!_genericServices.Instance.CheckGenericConstruction(node, targetMethod, inferredTypeArguments, true))
            {
                Error(node);
                return null;
            }

            IMethod constructedMethod = targetMethod.GenericInfo.ConstructMethod(inferredTypeArguments);
            Bind(node.Target, constructedMethod);
            BindExpressionType(node, GetInferredType(constructedMethod));

            return constructedMethod;
        }
ProcessMethodBodies