//only compare return type, attributes and signature public override bool Equals(object other) { var otherNode = other as FunctionDefinitionNode; if (null == otherNode) { return(false); } bool equalSignature = EqualityComparer <ArgumentSignatureNode> .Default.Equals(Signature, otherNode.Signature) && ReturnType.Equals(otherNode.ReturnType) && Attributes.SequenceEqual(otherNode.Attributes); bool equalBody = FunctionBody.Equals(otherNode.FunctionBody); return(equalSignature && equalBody); }