1. Notwithstanding the genuineness and due execution of the compromise agreement, as contained in the several instruments set out in the answers, were admitted by the failure of petitioner to file an affidavit denying the same (Code Civ. Proc., sec. ■448), he still insists that the court erred in dismissing the petition without giving him an opportunity to show that such agreement was, in fact, without consideration, or that his consent thereto was obtained by fraud, or that it had been extinguished by rescission, or that performance thereof had been waived by the deceased. It is true that, by the terms of section 462 of the Code of Civil Procedure, new matter in-an answer is deemed to be controverted without any special replication, and under that section a plaintiff has the right, while not denying the genuineness and due execution of an instrument set out in an answer, to show other matters in confession or avoidance thereof. But unless he brings to the attention of the trial court his purpose to .offer such evidence, that court cannot assume that he desires *582to make any such, defense, and in this case the motion of defendants for a dismissal of the petition was not opposed upon the ground that the petitioner desired to offer any proof tending, to show that the contracts and deeds set out in the answers were not freely entered into by the parties thereto, and for an adequate consideration, or that the same were superseded by any subsequent agreement, .or that Mrs. Catherine M. Garcelon had ever waived performance of the agreements therein contained. On the contrary,.the motion was opposed upon the grounds: 1. That the instruments set out in the answer contained no matter sufficient to estop the petitioner from maintaining this proceeding, or from showing tbat he has an interest in the estate of Catherine M. Garcelon; and 2. That no trial of the issues of fact tendered by the petition had been had, and that petitioner had been denied a trial of such issues by a jury. The court below, therefore, properly assumed that these were the only grounds upon which the petitioner opposed the motion, and it is too late to suggest here for the first time that he was entitled to make proof of other facts showing his right to contest the will of deceased, and which would have been sufficient to avoid the estoppel which, the trial court held, resulted from the compromise agreement.
2. The main question arising upon this appeal relates to the construction and effect of the compromise agreement set out in the answers. That agreement seems to have been prepared with great care, and there is no ambiguity in any of its provisions. By its terms the appellant and his brother waived their right, as-heirs of Dr. Merritt, to contest the will left by him, or to claim any portion of the estate bequeathed and devised by him to their aunt, other than the portion thereof which she gave and relinquished to them by that agreement; and in consideration of the property thus secured to them theyfurther agreed “that they, nor either of them, nor their respective heirs, shall or will at any time hereafter assert any right, title, or interest as heirs or *583heirs at law of the said Catherine M. Garcelon to the property, real and personal, derived by her under the said last will and testament of the said Samuel Merritt and doubtless, for the purpose of making the foregoing agreement upon their part more effectual, the appellant and his brother, in the deed executed by them for the purpose of carrying out the compromise agreement, and which is to be construed as a part of such agreement, covenanted “ to and with the said Catherine M. Garcelon, her heirs, devisees, legatees, executors, administrators, and assigns,” that they would not “in any manner, or to any extent, question, dispute, or contest any disposition of the property above mentioned or referred to, or any part thereof, or of any property which may be acquired therefrom or thereby which the said Catherine M. Garcelon may have made, or may hereafter make, by either deed or by her last will and testament.”
There is not the slightest contention that the parties to this agreement were not fully competent to contract in relation to their property rights, and the agreement itself recites that it was entered into “ after full examination into the facts, and full and deliberate consideration of the premises”; and there is nothing upon its .face to suggest that the differences thereby compromised were not settled upon fair and equitable terms, nor was there any offer to prove extrinsic facts for the purpose of impeaching the agreement in this or any other respect. The questions for decision, therefore, are whether such an agreement, based upon a full and adequate consideration, and entered into with deliberation by parties in every way competent to contract, is valid, and, if valid, is the petitioner thereby estopped from maintaining this proceeding to revoke the probate of the alleged will of his aunt. The agreement, as we have seen, in addition to his promise not to contest the will of his uncle, Dr. Merritt, contains two distinct covenants upon the part of the petitioner: 1. That he would not thereafter, as an heir at law of his aunt, Mrs. Garcelon, assert any right *584to tbe property derived by her under the will of his said únele; and 2. That he would never in any manner question or dispute any disposition which she might make of that property by deed or will. The first of these covenants is, in substance and effect, an agreement upon the part of the petitioner to relinquish as heir presumptive his expectancy in that portion of the estate of his aunt to which the agreement related. It is claimed by the petitioner that such an agreement is void under sections 700 and 1045 of the Civil Code of this state, the first of which provides that “a mere possibility, such as the expectancy of an heir apparent, is not to be deemed an interest of any kind,” and the latter section declaring that “ a mere possibility, not coupled with an interest, cannot be transferred.”
These sections simply state the well-settled and well-understood rule of the common law upon the subject to which they relate. At common law a mere possibility, such as the expectancy of an heir, was not regarded as such an existing interest as to be the subject of a sale or capable of passing by assignment; but in equity the rule was different, and agreements for the sale or release of expectancies, if fairly made and for an adequate consideration, were enforced upon the death of the ancestor; and, in our opinion, it was not the intention of the legislature, in enacting the sections of the code just referred to, to make any change in the rule by which courts of equity were theretofore governed in dealing with this class of contracts. This construction of these sections is in harmony with section 5 of the same code, which declares that the provisions of that code, “ so far as they are substantially the same as existing statutes or the common law, must be construed as continuations thereof, and not as new enactments”; and also follows the presumption that the legislature, in the enactment of statutes, does not intend to overturn long-established principles of law unless such intention is made to clearly appear either by express declaration or by necessary implication.
*585Mr. Story, in section 1040 c, volume 2, of his work on Equity Jurisprudence, states the equitable rule upon the subject of such agreements as the one before us as follows: “So, even the naked possibility or expectancy of an heir to his ancestor’s estate may become the subject of a contract of sale or settlement; and, in such a case, if made Iona fide for a valuable consideration, it will be enforced in equity after the death of the ancestor; not, indeed, as a trust attaching to the estate, but as a right of contract”: And see, also, as sustaining the same proposition, Pomeroy’s Equity Jurisprudence, 2d ed., secs. 168, 953; Bacon v. Bonham, 33 N. J. Eq. 614.
In accordance with this principle it has been held in many cases in which the question has arisen that an heir may release to the ancestor his expected share in the ancestor’s estate. Thus, in Havens v. Thompson, 26 N. J. Eq. 383, it was held that a son, by such release to his father, estopped himself from claiming as heir any portion of the father’s estate. In that case it appeared that the father gave to the son the sum of six hundred dollars, upon the condition that it should be accepted in full satisfaction of his' interest in the father’s estate, the son executing a receipt stating that the money wj^s received “in full in lieu of dowry.” The chancellor construed the receipt in view of the facts surrounding its execution as a release, and said: “I regard this instrument as an agreement by which Benjamin, in consideration of the money paid to him by his father, agreed with the latter that he would- make no claim to a share of his father’s estate should the latter die intestate, hut therefrom would be debarred by that instrument made upon what was a satisfactory compensating consideration. Such an agreement maybe made between a father and his child in regard to the interest of the latter in the estate of the former, and effect will be given to it in equity according to the intention of the parties”; and the rule thus declared was afterwards approved in Brands v. De Witt, 44 N. J. Eq. 545.
In Bishop v. Davenport, 58 Ill. 105, it was shown that *586the father in his lifetime gave to certain of his children property, and took from them an instrument in writing in which they acknowledged that such property was received by them as their full share of his estate. . The father died intestate, and the court, in passing upon the question, held that the transaction was not an advancement, and that the instrument signed by the children operated as a release by them of their expectancies in their father’s estate, and should be upheld as such.
So, also, in Kershaw v. Kershaw, 102 Ill. 307, a son accepted from his father a deed, the deed reciting that “said land is deeded as an advancement to said John W. Kershaw out of the estate of said Joseph Kershaw, and the deed is accepted by said John as his full share of his father’s estate.” The court in that case held that the acceptance of the deed bound the son to the same extent as if he had signed it, and that the conveyance did not constitute an advancement, but operated as “an executed contract, whereby an heir released his expectancy in his father’s estate in consideration of a present grant of real estate.” And it was further there decided that the son was estopped from making any further c]^im as heir at law to any portion of his father’s estate.
In Crum v. Sawyer, 132 Ill. 443, the court, in a well-considered opinion, held that a husband might, for an adequate consideration, enter into a valid contract with his wife, releasing all his interest as her heir in her lands and personal estate, saying: “There can be no question, then, that the complainant’s contingent interest or expectancy as the heir of his wife in her real and personal estate was a proper subject of contract, and the contract in question having been made upon a valuable consideration by parties capable of contracting with each other, and, so far as the evidence shows, with entire fairness, it should, as to such contingent interest or expectancy, be enforced according to its terms.” And in Powers’ Estate, 63 Pa. St. 443, it' was decided that a father might make a contract with his child which would bar the latter as his heir at law, and that when *587property had been received by the son from the father, the son giving a receipt reciting that the same was received in full of his share as heir at law, he was thereby estopped upon the death of the father from claiming any further part of his estate.
Without multiplying authorities upon this point, and many others might be cited to the same effect, it is sufficient to say that we are entirely satisfied with the rule declared in the foregoing cases, and hold that it is competent for an heir under the limitations stated in that rule to relinquish to his ancestor all interest in the estate of the latter which might otherwise in the future vest in him as such heir.
In Crum v. Sawyer, 132 Ill. 462, it was held that such a relinquishment would inure to the benefit of the other heirs, whether mentioned or not, and in all the cases we have cited the release so made to the ancestor was enforced in behalf of other heirs. In this case, however, it is claimed by the petitioner that the pleadings admit that he and his brother are the only heirs of Mrs. Garcelon, and it is thence argued: 1. That, if in fact she died intestate, her property must, under the statutes of this state, he distributed to them, notwithstanding they may by the compromise agreement have relinquished to her their rights as such heirs; and 2. That the defendants are strangers in no way in privity with that agreement, and, therefore, are not entitled to claim the benefits of its provisions.
In the view we take of this case it is not necessary to determine what force, if any, there might be in the first of these contentions, if Mrs. Garcelon had in fact died intestate, and the question arose upon the distribution of her estate as that of an intestate. It is admitted that Mrs. Garcelon executed apparently in due form of law a document which, upon its face, purports to be her will,' and which, if valid, disposed of all her estate consisting of all the property referred to in the compromise agreement of which she died possessed, and this document has been duly admitted to probate as her last will and testa*588ment. So long as this judgment stands it cannot be said that the deceased died intestate, and, unless the petitioner shall succeed in annulling the said judgment of probate, the question as to what would have been his rights as her heir at law if she had died intestate can never arise. The real question is, Does the petitioner have the right to maintain this proceeding in the face of his agreement that he would not contest any will of his aunt? The court below held that he could not, and this was one of the grounds upon which the court based its judgment dismissing the present proceeding.
3. This conclusion of the learned judge of that court was doubtless based upon a consideration of that part of the compromise agreement in which the petitioner covenanted with Mrs. Garcelon, “ her heirs, devisees, legatees, executors, and administrators,” that he would “ never in any manner or to any extent question, dispute, or contest any disposition of the property” mentioned in that agreement “ which she may have made, or may hereafter make, by either deed or by her last will and testament.” If this covenant is valid, and is sufficiently broad to apply to and include a will, the validity of which is challenged, as is this, upon the grounds of incompetency of the maker, or because of its alleged execution under duress, or undue influence, it is clear that the defendants, as exceutors of the disputed will, are in such privity with the alleged testator that they have the right, as against the petitioner, to invoke the benefit of this covenant not to contest (Dakin v. Dakin, 97 Mich. 289), and it would follow that the court below was correct in its ruling upon this point.
This particular covenant was evidently inserted by the parties for the purpose of supplementing the other part of the compromise agreement in which the petitioner relinquished to his aunt his expectancy as her presumptive heir at law, and was intended by him as a complete relinquishment or release of all right to contest, upon such grounds as are set forth in the petition filed in this proceeding, any will apparently executed in due form *589and, in fact, signed by bis aunt, and wbicb right of contest might otherwise, as a matter of possibility, come to him in the future as such heir at law. To place any other construction upon the agreement would deprive it of all practical meaning and effect. The agreement not to contest was made in view of th.e fact that, under the law, an heir is given the right to contest the validity of the document actually intended by the ancestor as his last will and testament, some of the grounds upon which such a contest is permitted by the statute often involving doubtful questions of law and fact; the latter, perhaps, depending for their decision upon the conflicting evidence of witnesses, and also upon the verdict of a jury which may be more or less influenced by sympathy or caprice; and the covenant of the petitioner was that he would not bring such questions concerning any will made by his aunt into dispute or litigation. Such being its true construction, w'e are brought to the consideration of the question, Is such an agreement upon the part of an heir binding upon him? The covenant not to sue for a breach, or for the enforcement of an existing obligation, operates as a release of such obligation; and unless void as against public policy (a point to be hereafter noticed), this covenant not to contest the will of Mrs. Garcelon should be given effect as a release by the petitioner of his right to make such contest. It is true that at common law a mere possibility was not the subject of release, and that a release was held to operate only upon a present interest. (Pierce v. Parker, 4 Met. 80; Reed v. Tarbell, 4 Met. 93.) A covenant made by one person not to sue another for or in respect to any matter arising out of future contracts between them, or by reason of any future tort, would, of course, be utterly void, as the parties to such contract could not have in view any particular subject matter, or have any conception of the amount which might be involved in the causes of action upon which the covenant was to operate. But in this case the subject matter of the covenant was in the mind of the con*590tracting parties, and was in its nature no more fleeting and unsubstantial than the assignment of an'expectancy, and the same principle upon which courts of equity uphold such assignments will sustain the proposition that a release by a presumptive heir of his contingent right to contest the will of his ancestor may also be enforced when fairly obtained, and based upon ah adequate consideration. The two contracts stand upon the same basis; both relate to possibilities, and both concern the same subject matter — the expectancy of the heir — the purpose of the latter agreement being to take away from the heir any right to assert any claim to such expectancy, in the face of a will bequeathing or devising it to another, and both are equally entitled to enforcement.
4. It is argued, however, in behalf of petitioner, that such an agreement is void because against public policy, and in support of this contention the case of Home Ins. Co. v. Morse, 20 Wall. 451, is cited. In that case it was held that an agreement by an insurance company in its contract of insurance not to litigate in the federal courts any claim arising upon the contract was void; and in Nute v. Hamilton Mutual Ins. Co., 6 Gray, 174, a similar question was decided in the same way, and the reasons for such a conclusion were very fully and carefully stated by Chief Justice Shaw in a clear and comprehensive opinion, but there is no analogy between those cases and the one before us, and the reasons upon which the decisions in those cases rest are not at all applicable to a covenant not to contest a will such as we are now considering.
5. The petitioner further contends that it is against the policy of the law that the will of an insane person, or a will executed under the influence of fraud or duress, should be established as a valid will, and that this particular covenant is void, because it attempts to bind the petitioner not to show such facts, and thereby attempts to prevent him from establishing the invalidity of the will in controversy.
In passing upon this question we start with the prop*591osition laid down by Sir G. Jessell, M. R., in his opinion in the case of The Printing Numerical Registering Co. v. Sampson, 19 L. R. Eq. Cas. 465: “It must not be forgotten that you are not to extend arbitrarily those rules which say that a given contract is void, as being against public policy, because, if there is one thing which more than another public policy requires, it is that men of full age and competent understanding shall have the utmost liberty of contract, and that their contracts when entered into freely and voluntarily shall be held sacred, and shall he enforced by courts of justice. Therefore, you have this paramount public policy to consider— that you are not lightly to interfere with this freedom of contract.”
The sole object which the parties had in mind in entering into the covenant now under consideration was to secure to Mrs. Garcelon the right to make such disposition of her property as she might desire, free from the contingency that her right so to do, or the fact that in so disposing of it she acted freely or voluntarily, might after her death be disputed by the petitioner or his brother; and, as before stated, the agreement was made in contemplation of the fact that controversies concerning the validity of wills or deeds frequently involve doubtful questions of fact, and that, by reason of false testimony or the weakness of juries, their final decision may not always be in accordance with the actual justice and truth of the case; and we'see no reason why persons whose rights of property would be affected by the decision of such questions may not in advance, for an adequate consideration, waive their right to engage in such litigation. Such a contract is one that concerns the parties alone, and. does not appear to us to be against public policy. There never has been any doubt that parties actually engaged in contesting a will upon any of the grounds upon which such contests are permitted may compromise all matters in difference arising out of such contest, and allow the disputed will to be established, and such agreements, when *592fairly made, are always enforced. It is difficult to understand why such a compromise agreement is any less against public policy than an agreement made by an heir apparent or heir presumptive with his ancestors not to contest a future will of the latter. In addition to this we think the principle upon which the case of Cooke v. Turner, 14 Sim. 493, was decided is sufficient to sustain the validity of this covenant, so far as relates to the question of' public policy. The question in that case arose upon a condition in a will to the effect that, if a devisee should dispute the will or the competency of the testator to make it, the devise thereby given to her should be revoked. It was argued in'that case that such a condition was void, as against public policy, because having a tendency to set up the wills of insane persons by restraining heirs named therein as devisees from contesting such wills; but the court, in answer to this argument, said: “There appears to be no more reason why a person may not be restrained by a condition from disputing sanity than from disputing any other doubtful question, whether of fact or of law, on which the title to a devise or grant may depend.” And the court then, after calling attention to certain conditions which, if found in a will, would be declared void as against public policy, such as conditions in restraint of marriage or of lawful trade, proceeded to say: “But, in the case of a condition such as that before us, the state has no interest whatever, apart from the interest of the parties themselves. There is no duty, either perfect or imperfect, on the part of an heir to contest his ancestor's sanity. It matters not to the state whether the land is enjoyed by the heir or by the devisee; and we conceive, therefore, that the law leaves parties to make just what contracts and engagements they may think expedient as to raising or not raising questions of law or of fact among themselves, the sole object of which is to give the enjoyment of the property to one claimant rather than to another.” This reasoning is applicable to the case at bar, for it must be admitted that that which is valid by way of condition, *593whether in a will or deed, would also be valid as a covenant contained in a contract. See, also, as sustaining the decision in Cooke v. Turner, 14 Sim. 493, Bradford v. Bradford, 19 Ohio St. 546; 2 Jarman on Wills, *902; 2 Redfield on Wills, 679.
We have given to the earnest and able argument of the attorneys for the petitioner careful consideration^ and, while we have not noticed in detail all the points urged by them in support of this appeal, the views above set forth are really conclusive of every question discussed by them. " ■
Our conclusion upon the whole case is that the compromise agreement is valid, and that the petitioner is thereby estopped from maintaining this proceeding; and it follows therefrom that the superior court did not err in refusing petitioner’s demand for a trial of the issues relating to the sanity of the testator or her freedom from undue influence. If the petitioner was not entitled to litigate these matters the orderly course of procedure required that the court should dismiss his petition, as it did.
The respondents have moved to dismiss the appeal, but, in view of our conclusion upon the merits, it is not necessary to discuss the grounds of such motion. We think the motion should be denied.
Motion to dismiss appeal denied, and judgment affirmed.
Fitzgerald, J., and McFarland, J., concurred.Hearing in Bank denied.