
199 Cal.App.2d 527 (1962)
GEORGE B. PAGE et al., Plaintiffs and Respondents,
v.
H. B. PAGE, Defendant and Appellant.
Civ. No. 25316. 
California Court of Appeals. Second Dist., Div. Three.  
Jan. 26, 1962.
 Schauer, Ryon & McIntyre and Robert W. McIntyre for Defendant and Appellant.
 Cavalletto, Webster, Mullen & McCaughey, Trevey, Schwartz & Wood, Trevey, Schwartz, Wood & Otero and Jack A. Otero for Plaintiffs and Respondents.
 FRAMPTON, J. pro tem.  [fn. *]
 Defendant appeals from the judgment rendered below, in a declaratory relief action, wherein it was determined that Mission Linen Supply of Santa Cruz was a partnership at will, and that as such partnership it could be dissolved by the express will of any partner upon notice to the other partners.
 The testimony reveals that George B. Page and appellant are brothers. About January 1945 the two brothers and respondent *529 Montgomery, an attorney at law, entered into a partnership for the conduct of a linen supply business in the city of Santa Cruz, California. There was never any written agreement evidencing the partnership. Their understanding concerning the partnership was oral, "that we would be partners--thirds," and there was nothing said with regard to the term or the undertaking of the partnership. Each partner was to furnish one-third of the capital. At first, each one put in $12,000, and later, as the business grew, each put in an additional $8,000. The business has shown an annual profit from the start. Respondent Montgomery testified that he had never discussed any details of the partnership agreement, as to its duration or undertaking, with appellant except that he had talked with him about three times within the last three years when it appeared that appellant and his brother had had a misunderstanding over another matter and at which time Montgomery told appellant he was convinced that respondent George B. Page would ask for a dissolution of the partnership. Montgomery told appellant "that in my opinion he had the privilege of doing so, and there was nothing I could do to prevent it." Montgomery testified there was no agreement as to how long the partnership would continue to operate. The testimony of all three partners is characterized by an astonishing lack of evidence relating to details concerning the establishment of the partnership and the terms upon which it would operate. The fact is that it was formed; each partner contributed one- third to its capital, and each received over the years of its operation one- third of its profits.
 On July 29, 1959, respondent George B. Page, through his counsel, addressed a letter to appellant's attorneys stating in substance that be believed the partnership to be one at will which could be dissolved by notice of any partner to the others, and that it was his desire to accomplish the dissolution thereof. He asked whether appellant agreed that the partnership was one at will, and if not, he would appreciate appellant's advice as to its terms. On August 25, 1959, appellant's attorneys replied in part as follows: "There is some question in my mind as to the answer to the question you propound as to whether or not this partnership is terminable as between G. B. Page and H. B. Page as a partnership at will. The circumstances surrounding the formation of this partnership and agreement of the partners is, to say the least, cloudy. Furthermore, Mr. G. B. Page is in violation of the partnership agreement in a number of respects which, of course, may affect his *530 right to dissolve." Respondents filed their action in declaratory relief shortly thereafter. The first amended complaint, to which demurrer was overruled, alleged in substance that respondents and appellant, about January 1945, pursuant to oral agreement, formed a partnership under the name and style of "Mission Linen Supply of Santa Cruz" to carry on the business of linen supply in Santa Cruz, California; that the partners orally agreed that each would have a one-third partnership interest; that no time was fixed for the duration of the partnership and that "the plaintiffs and defendant did not agree as to any specific undertaking regarding the said partnership." The complaint further alleged "That an actual controversy has arisen and now exists relating to the status of the said partnership as one at will or one for a term." The first amended complaint further alleged in substance that for approximately two years last past, the parties had orally discussed the termination and dissolution of the partnership but could not agree upon the manner in which it should be terminated and dissolved; that plaintiffs desire to terminate the partnership, by notice, but only in the event such method would not constitute a breach on their part of the partnership agreement. The complaint concludes with the prayer that the court determine the status of the partnership as one at will or for a term; also whether it may be terminated by notice of one or more partners to the other without a breach of the partnership agreement.
 Appellant's answer admitted the formation of the partnership as alleged in the first amended complaint in all particulars except that he denied that the partnership was one at will which could be terminated by notice, and asserted it was a partnership for a term; that the partners agreed to establish new linen supply businesses in other communities from the proceeds of the partnership and that it would continue as a permanent investment of the partners so long as it operated at a profit and it was economical to expand into other communities. The issues as framed by the pleadings were clearly delineated in the joint pretrial statement and order.
 Appellant's first complaint of error seems to be that the trial court, in overruling his demurrer, both general and special, to the first amended complaint, left him in a very awkward position because he knew very little of the terms and conditions of the partnership agreement. This assertion is not borne out by the record for the following reasons: First, the testimony of the parties including appellant shows that the agreement to form the partnership was most informal. *531 Just how the plaintiffs could have pleaded the oral understanding more specifically under the circumstances is not shown. Second, appellant remained as a partner and received his share of the profits from the time of the formation of the partnership (1945) until suit was filed (1959) without question as to the details of its formation or its operation. Furthermore, in his answer appellant set forth his version of the partnership agreement as follows: "Answering Paragraph IV of the first cause of action set forth in said first amended complaint, this answering defendant denies said paragraph, the whole thereof, and each and every allegation therein contained; and in this respect alleges the true facts to be that at the time of the formation of said partnership and from time to time thereafter it was mutually agreed by, between and among said three partners that said partnership business should be a permanent investment of the partners from which said partners would withdraw profits for the purpose of establishing further and additional plants and operations in the linen supply business and that said partnership business should be kept in operation as such so long as said partnership enterprise operated at a profit and there were opportunities for and it was economical to either expand said partnership business in Santa Cruz or establish other such businesses in other communities and that in this respect there are possibilities of expanding and enlarging said Santa Cruz operation and there are and will be opportunities to establish profitable linen supply businesses in other communities in the State of California and nearby states." The issues raised by the answer were carried into the pretrial statement and order, and a full opportunity to be heard thereon was given in the trial of the action. [1-5] The rule with respect to the sufficiency of a partnership agreement is stated generally as follows: "In the agreement of the partners is to be found the definition of their rights, duties, and liabilities. It is of course necessarily implied from the statutory definition of a partnership as an association of two or more persons to carry on as co-owners a business for profit that any such association must be with the consent of the parties. The consent of a party may, however, be given by an authorized agent. And it is not necessary that assent be evidenced by an express contract. It may be implied from the acts and declarations of the parties. It follows that no particular formalities are required in entering on a contract of partnership, and the agreement need not be in writing." (37 Cal.Jur.2d, Partnership,  4, p. 526.) *532
 [6] It is well settled that the failure of a complaint to state a cause of action is not fatal to a judgment for the plaintiff unless the appellant can show that the error has resulted in a miscarriage of justice. [7] Where the parties at the trial treat a certain issue as being involved, and the judgment is based on that issue, it is not a prejudicial error that the complaint defectively alleges or fails to allege at all that issue. (Ades v. Brush, 66 Cal.App.2d 436 [152 P.2d 519], at p. 444; Johnson v. Hapke, 183 Cal.App.2d 255 [6 Cal.Rptr. 603], at p. 261; County of San Mateo v. Bartole, 184 Cal.App.2d 422 [7 Cal.Rptr. 569], at p. 430.) It is difficult to see where appellant has been prejudiced, under the circumstances, by the fact that the complaint did not set forth more specifically the details of the partnership agreement. [8] Furthermore, if the demurrer raises a fundamental defect of substance which cannot be cured, it is of course reversible error to overrule it. But if the defect, even though consisting of a failure to state a cause of action, is one of form, the usefulness of the demurrer seldom extends beyond the trial court. [9] The risk of refusing to answer and appealing from the resulting judgment by default is great, and, to be safe, the defendant will usually answer and go to trial. But this operates, just as does a failure to demur, to waive the formal defect. After a trial in which the defective complaint is treated as raising the issues, any error in overruling the demurrer cannot have been prejudicial, and reversible error is not shown. (2 Witkin, California Procedure,  503, p. 1493.) If it can be said that the issues were not clearly defined in the pleadings, such pleadings were superseded by the pretrial order which incorporated the detailed contentions of both sides with respect to the nature of the partnership. (Baird v. Hodson, 161 Cal.App.2d 687 [327 P.2d 215].)
 [10] Appellant next contends that this action and others have not been started in good faith, but constitute a program undertaken by respondent George B. Page to freeze out appellant, and by use of superior financial position to force this appellant to sell his interest in this partnership and others to such respondent at less than their real value, and therefore the trial court erred in sustaining an objection to his question wherein respondent George B. Page was asked, "Tell me, why is it that you desire to dissolve this partnership?" An examination of the record fails to disclose any issue of bad faith raised by the answer or the pretrial statement or order. No request was made to amend the pleadings to raise such *533 issue at the trial. The cause of action was not one, the purpose of which was to dissolve the partnership. Under these circumstances bad faith was not a material issue. [11] Evidence which is not pertinent to the issues raised by the pleadings is immaterial, and it is error to allow the introduction of such evidence. (Fuentes v. Tucker, 31 Cal.2d 1 [187 P.2d 752]; Estate of Boyes, 151 Cal. 143, 147 [90 P. 454]; Code Civ. Proc.,  1868.)
 [12] Appellant next urges that the evidence was insufficient to support the findings, conclusion and judgment. In this connection it is significant that the existence of the partnership was admitted by the pleadings. The evidence disclosed that appellant and respondents carried on the partnership business for over 14 years on the express understanding that each owned an undivided one-third interest in the partnership business, and the business having been profitable, each partner annually received his one- third share of such profits. The only dispute between the partners concerning the specific provisions of the partnership agreement appears to have been as to the term of the partnership, that is, whether it was a partnership at will or a partnership for a term or a particular undertaking, and whether such partnership could be terminated without breach of the partnership contract by notice of one or more partners to the other of his intention to terminate. This latter issue, as has been shown, was squarely before the trial court. Respondent George B. Page testified there was no discussion about the term of the partnership. Respondent Montgomery likewise testified that at the beginning there was no agreement as to the term or undertaking of the partnership; that long after the inception of the partnership, within the last three years, after there had been some misunderstanding between George B. Page and appellant, he told appellant that George B. Page had the privilege of asking for dissolution of the partnership; that there was never any agreement that the partnership would continue for a definite time. Appellant also testified there was no agreement as to how long the "Santa Cruz" partnership would continue to operate. The Uniform Partnership Act provides that a partnership may be dissolved "By the express will of any partner when no definite term or particular undertaking is specified." (Corp. Code,  15031, subd. (1) (b).) From the foregoing, it appears there was an abundance of evidence to support the findings, conclusions and judgment of the trial court.
 The judgment determined only that "Mission Linen Supply *534 of Santa Cruz is a partnership at will, and ... that Mission Linen Supply of Santa Cruz may be dissolved by the express will of any partner upon notice to the remaining partners without violation of the agreement between the partners."
 [13] If there should be a dissolution of the partnership, and if on such dissolution it should be established that the one seeking it is acting in bad faith and is violating his fiduciary duties by attempting to appropriate to his own use the prosperity of the partnership without adequate compensation to his copartners, the dissolution would be wrongful and such partner would be liable as provided by subdivision (2) (a) of Corporations Code section 15038 (rights of partners upon wrongful dissolution) for violation of the implied agreement not to exclude his partners wrongfully from the partnership business opportunity. (Page v. Page, 55 Cal.2d 192, 197 [10 Cal.Rptr. 643, 359 P.2d 41].)
 The judgment is affirmed.
 Shinn, P. J., and Ford, J., concurred.
NOTES
[fn. *]  *. Assigned by Chairman of Judicial Council.
