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

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

private ProcessDefaultValueInvocation ( MethodInvocationExpression node ) : void
node MethodInvocationExpression
Результат void
        void ProcessDefaultValueInvocation(MethodInvocationExpression node)
        {
            if (node.Arguments.Count != 1)
            {
                Error(node, CompilerErrorFactory.MethodArgumentCount(node.Target, "__default__", 1));
            }
            else
            {
                Expression arg = node.Arguments[0];
                if (arg.Entity == null)
                {
                    Error(node, CompilerErrorFactory.TypeExpected(arg));
                    return;
                }
                var entity = GetEntity(arg);

                EntityType type = entity.EntityType;

                if (type != EntityType.Type)
                {
                    Error(node, CompilerErrorFactory.TypeExpected(arg));
                }
                else
                {
                    BindExpressionType(node, (IType)entity);
                }
            }
        }
ProcessMethodBodies