
47 Wis.2d 494 (1970)
177 N.W.2d 372
ESTATE OF ROSENSTEIN: STATE, Appellant,
v.
BEGGS, Special Administrator, Respondent.
No. 252.
Supreme Court of Wisconsin.
Argued April 30, 1970.
Decided June 5, 1970.
*495 For the appellant the cause was argued by Roy G. Mita, assistant attorney general, with whom on the brief was Robert W. Warren, attorney general.
For the respondent there was a brief and oral argument by Ronald G. Lewis of Madison.
HALLOWS, C. J.
The petition claiming the funds alleged William R. Gaspard died intestate in the state of Illinois on a date unknown to the petitioner more than ten years prior to the date of the petition, which was verified on August 14, 1967. It further alleged, in effect, *496 the legacy left to Gaspard was held by the executor of the will of Lillian Gaspard Rosenstein for 120 days as an unclaimed legacy and then paid over to the treasurer of the state of Wisconsin on August 3, 1960, in accordance with sec. 318.03 (1), Stats. The petition also alleged that on August 18, 1960, the state treasurer published notice to heirs of the escheated funds and required claims to be made within seven years from the date of publication and that the seven years had not expired.
The state of Wisconsin demurred to the petition on the ground the petition did not state a cause of action because Gaspard died ten years prior to the date of the petition. At a hearing the state agreed to be bound by the date of death of William R. Gaspard as determined by the county court of Dane county in which the special administration proceeding was pending. A year and a month later, the Dane county court by application of sec. 253.10 (6) (c), Stats.,[1] declared Gaspard was legally dead as a nonresident foreign person who had not been heard of or from for ten years. Upon the filing of this order in this proceeding, the La Crosse county court, because of the absence of proof of the exact date of death, found Gaspard died at the end of the ten-year period, to wit, in March, 1962, and ordered the certificate to pay the escheated funds to the special administrator. Upon motion of the state, this order was set aside and a rehearing had on its demurrer. After the hearing, the court made findings of fact and conclusion of law determining the approximate date of the death of Gaspard, denied the demurrer and reissued the certificate to pay the escheated funds.
The contention of the state that the petition does not state a cause of action is only true if the court may take judicial notice of the date of the death of Lillian Gaspard *497 Rosenstein in this proceeding. She died on June 22, 1958. If the allegation that Gaspard was dead for ten years is true, and judicial notice is taken of his aunt's death, he could not be a legatee because he would have predeceased her. But if this procedure were taken, the final judgment and proof of heirship in the estate would be incorrect.
Upon a demurrer, a court may not add factual matters as an allegation to a complaint to aid or defeat it. To allow facts dehors the pleading would in effect constitute the demurrer a speaking demurrer which is not recognized in this state and has been condemned both by the common law and the code system of pleading. See Black's Law Dictionary, "Demurrer;" 41 Am. Jur., Speaking Demurrer, p. 440, sec. 209 (1942). The function of judicial notice is to supply evidence, not an allegation in a pleading. 29 Am. Jur. 2d, Evidence, p. 53, sec. 14 (1967).
The difficulty in this case is that the hearing on the demurrer was turned into a hearing on the merits of the petition. We question the use of the demurrer to a petition in a probate proceeding when a motion to dismiss supported by the necessary facts would have been more appropriated and would have avoided the confusion which developed in this case. Objections which do not appear on the face of the plaintiff's declaration or complaint must be taken by plea or answer and not by demurrer even though extrinsic facts are conceded at the hearing. 41 Am. Jur., Pleading, pp. 439, 440, sec. 208 (1942). Because a petition for escheated funds is brought in a probate proceeding is not reason why a court may import into the petition other facts in the probate proceeding when a demurrer is interposed. The petition under sec. 318.03 (4), Stats., should stand on its own feet.
In its second argument, the state attempts to claim Robert P. Gaspard, a half brother of William R. Gaspard, would be the proper party to make a claim for the funds. *498 This argument must fail because it assumes as does the first argument that the demurrer admits William R. Gaspard predeceased his aunt. The relationship of Robert P. Gaspard as an heir is also dehors the petition which does not mention him.
The third argument of the state claims the presumption of death, sec. 253.10 (6) (c), Stats., cannot be invoked in this proceeding. The presumption of death was applied in the special administration proceeding in Dane county. Upon this presumption, the court in this proceeding, under sec. 318.03 (4) found the approximate date of death based upon the presumption in order to determine the claim of the special administrator. In the case of an unclaimed legacy of a known person who is deceased, his administrator is a proper party to make the claim. Estate of Smith (1962), 16 Wis. 2d 118, 113 N. W. 2d 841. We see no reason and no authority is cited why the court in this proceeding could not determine the date of death of William R. Gaspard to determine whether his estate is entitled to the escheated funds. There is no determination of collateral heirs. Nor is this a case of unknown heirs or of derivative heirs. Under the rationale of Estate of Smith, supra, proof of heirship should be avoided in a proceeding under sec. 318.03 (4) and if the escheated funds constitute assets of a deceased owner, the funds should be paid to his estate and distributed in the probate proceeding. This is the only way creditors can be protected and the proper way for determination of collateral and derivative heirs.
The agreement of the state at the hearing on its demurrer to be bound by a fact finding of the Dane county court was an unusual and inconsistent procedure and in effect waived a hearing on the demurrer according to the rule applicable to demurrers. We think the state cannot now change its tactics. In any event, the trial court reheard arguments on the demurrer and denied *499 it although on different grounds than this court would have. Since the case was correctly decided on its merits, the order ought to be affirmed.
By the Court.Order affirmed.
NOTES
[1]  "253.10 Probate jurisdiction. ... (6) (c) All nonresident foreign persons referred to in subs. (4) and (5) who have not been heard from for 10 years shall be presumed to be dead."
