Babel.Compiler.TypeElementCreatingVisitor.CheckMethodConfliction C# (CSharp) Method

CheckMethodConfliction() protected method

protected CheckMethodConfliction ( TypeData type, string name, TypeData returnType, TypedNodeList arguments ) : void
type TypeData
name string
returnType TypeData
arguments TypedNodeList
return void
        protected virtual void CheckMethodConfliction(TypeData type,
                                   string name,
                                   TypeData returnType,
                                   TypedNodeList arguments)
        {
            MethodSignature sig =
                new MethodSignature(type, name, returnType, arguments);

            foreach (MethodData m in type.Methods) {
                if (m.ConflictWith(sig)) {
                    string msg = "The signature: " + sig +
                        " conflicts with the earlier feature signature: " + m;
                    throw new MethodConflictionException(msg);
                }
            }
        }