The opinion of the court was delivered by
Robert Mood died testate at his.late residence in the city of Topeka on the .28th day, of December, 1897. The last will and testament of deceased, executed on the 20th day of May,, 1896,, was duly admitted to probate on the 15th day of January, 1898, and his widow, Jane S. Mood, was on said day duly appointed executrix; At the time-of his death *374Robert Mood left as his heirs at law his widow, Jane S. Mood, and three daughters, Ida M. Wehe, Jennie Wehe, and Lola Bennett. The widow, to whom he had been married for more than thirty years, is the stepmother of the daughters., and has no children of her own. By the terms of his will Robert Mood devised and bequeathed all his property, real and personal, shown to be of the value of about $25,000, to his widow absolutely, except real estate in the city of Topeka shown to be of the reasonable value of $6000, which was devised to the daughters, share and share alike, with a life-interest therein ,to the widow. On July 21,1899, the daughters of deceased filed their petition in the district court of Shawnee county against the widow, Jane S. Mood, and Jane S. Mood, as executrix, to contest the will, charging that its execution had been induced and procured by the fraud and undue influence of Jane S. Mood. The case was tried on March 28, 1902, to the court without a jury, and after plaintiffs had concluded their evidence the court sustained a demurrer to it and rendered judgment against the plaintiffs for costs. They allege error and bring the case to this court for review.
Upon the trial plaintiffs were not permitted to testify as to_ communications had personally with the testator, Robert Mood. The trial court held that plaintiffs were not competent to testify in their own behalf as to communications had personally with the deceased, under section 322 of the code (Gen. Stat. 1901, § 4770). So much of said section as is necessary to be considered reads as follows :
“No party shall be allowed to testify in his own behalf in respect to any transaction or communication had personally by such party with a deceased person when the adverse party is the executor, administrator, heir at law, next of kin, surviving partner or assignee *375of such deceased person, where they have acquired title to the cause of action immediately from such deceased person.”
The contention of plaintiffs is that said section 322 does not apply to them ; that the widow only claims as devisee under the will; that plaintiffs repudiate the will and claim as heirs of the testator under the statute of descents and distributions ; that plaintiffs, as such heirs, do not acquire the title from the testator, but that the law casts it upon them without any regard to their wish or election ; that for the reasons stated they are not claiming title immediately from the deceased.
To this contention of plaintiffs we cannot agree. The heirs of a deceased person acquire title immediately from such deceased person, within the spirit and meaning of section 322 of the code, and plaintiffs were incompetent to testify in respect to communications had personally with the deceased. . (Rich v. Bowker, 25 Kan. 7; Caeman v. Van Harke, 33 id. 333, 6 Pac. 620.) The court committed no error in excluding this testimony.
Plaintiffs assign as error that the court sustained defendant's demurrer to the evidence. The practice of allowing demurrers to evidence in cases tried to the court the same as in jury cases has been recognized by this court. (Lumber Co. v. Savings Bank, 52 Kan. 410, 34 Pac. 1045.) We have carefully read the record in this case. Upon the question of whether or not the will of Robert Mood had been induced and procured by the fraud and undue influence of defendant, Jane S. Mood, plaintiffs offered the testimony of numerous witnesses. The evidence offered was conflicting. There was some evidence tending to establish the claim of plaintiffs. The trial.court *376could not, upon demurrer, review the evidence as though the merits of the case had been submitted on the evidence of plaintiffs. We, however, express no opinion as to the effect of the evidence, had the case been submitted on its merits .instead of upon demurrer.
In the case of Wolf v. Washer, 32 Kan. 533, 537, 4 Pac. 1036, Mr. Justice Valentine, upon the question of a demurrer to the evidence in a case tried to the court, said :
“In order to sustain a demurrer to the evidence, the court must be able to say, as a matter of law, that the party introducing the evidence has not proved his case ; and the court cannot, upon conflicting and contradictory evidence, say that, as a matter-, of fact, the preponderance of the evidence shows that the party introducing it has not proved his case. If, in the present case,.no demurrer to the evidence had -been interposed, and the case had been submitted to the court upon the evidence introduced, for a decision upon the merits and as- to what the conflicting' and contradictory evidence in fact proved, and the court had decided the case in favor of the defendants and against the plaintiff, the decision in all probability would be right; for in such, a case the court would have weighed the conflicting and contradictory evidence and would have decided the case upon the preponderance of the evidence ; but the court cannot do such a thing where a demurrer to the evidence is interposed, and where the court decides the case as a question of law upon the demurrer.”.
The court committed error in sustaining the demurrer.
On Januaiy 4, 1901, plaintiff Jennie Wehe moved the cpurt to dismiss the action as to her, without prejudice. The motion was overruled.
Section 7957, General Statutes of 1901, provides that an action to contest a will may be brought at any *377time within two years after the probating of the will by any person interested in the will or in the estate of the deceased. Section 397 of the code (Gen; Stat. 1901, § 4846) provides that an action may be dismissed without prejudice to a future action by the plaintiff before the final submission of -the case to the jury, or to the court where the trial is by the court. The right of plaintiff Jennie Wehe in this case to dismiss without prejudice is fixed by statute, and does not rest in the discretion of the trial court, as suggested by counsel.
Section 36 of the code (Gen. Stat 1901, § 4464) provides a means of bringing into a case as defendants all parties necessary to a complete determination or settlement of the questions involved. There was error in not sustaining the motion of plaintiff to dismiss.
The j udgment below is reversed, with direction to sustain the motion of plaintiffs for a new trial and the motion of plaintiff Jennie Wehe to dismiss.
All the Justices concurring.