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

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

private GetCorrectConstructor ( Node sourceNode, IType type, Boo.Lang.Compiler.Ast.ExpressionCollection arguments ) : IConstructor
sourceNode Node
type IType
arguments Boo.Lang.Compiler.Ast.ExpressionCollection
Результат IConstructor
        IConstructor GetCorrectConstructor(Node sourceNode, IType type, ExpressionCollection arguments)
        {
            var constructors = type.GetConstructors().ToArray();
            if (constructors.Length > 0)
                return (IConstructor)GetCorrectCallableReference(sourceNode, arguments, constructors);

            if (!IsError(type))
            {
                if (type is IGenericParameter)
                    Error(CompilerErrorFactory.CannotCreateAnInstanceOfGenericParameterWithoutDefaultConstructorConstraint(sourceNode, type));
                else
                    Error(CompilerErrorFactory.NoApropriateConstructorFound(sourceNode, type, GetSignature(arguments)));
            }
            return null;
        }
ProcessMethodBodies