Opinion op the Court by
— Affirming.
The appellant here was plaintiff below, and is appealing from a directed verdict against him. About 5:15 p. m. on Sunday, February 19, 1928, Emmett L. Quick and J. Palmer Utterback were en route to St. Louis, Mo. They were riding in a Dodg’e coupe, which was owned and driven by Quick. Between the cities of Mascoutah and Belleville in the state of Illinois, and while traveling route No. 15 in that state, this automobile left the highway, was overturned, and Utterback was instantly killed. J. C. Utterback qualified as administrator of his said son’s estate and instituted this action in the circuit court of McCracken county, Ky., against Quick. He asked judgment for $10,000 for the death of Palmer Utterback, which it was alleged was caused by the negligence of Quiftk in the operation of this automobile.
In his petition, he pleaded that at its regular session in 1853 (Laws 1853, p. 97), the Legislature of Illinois passed an act by the provisions of which a liability is imposed upon one who by his negligence causes the death of another, and that by an amendment to that act, approved May 13,1903 (Laws 1903, p. 217), the Legislature of Illinois had provided that such an action should be brought by and in the name of the personal representative of the deceased and that the amount recovered in every such action shall be for the exclusive benefit of the widow and next of kin of the deceased; and that by the provisions of that act the amount of recovery is limited to $10,000. The defendant demurred to the petition and, without waiving his demurrer, answered. In the first paragraph of his answer, he controverted the petition. The second paragraph of his answer was a plea of joint enterprise and contributory negligence. The plaintiff amended his petition .and made his allegations of negligence more specific. The defendant amended his answer and denied these allegations, whereupon the plaintiff filed reply. *335The court, after considering defendant’s demurrer to the petition and to the petition as amended, overruled it. Thereafter, upon motion of the defendant, it was ordered that the order filing this demurrer be set aside, and the defendant was allowed to withdraw and did withdraw his demurrer. The parties filed a stipulation signed by their attorneys in which they agreed that the statutes pleaded by the plaintiff in his petition were correctly pleaded and were still in force;, that the citations showing where said laws may be found were correct; proof of these statutes was waived; and it was agreed that the McCracken circuit court and this court may treat the statutes quoted in the petition ' as properly pleaded and proven on all motions and trials in this case. This stipulation went further and provided:
“It is further agreed that every rule of law established by the decisions of the Supreme Court of Illinois, or the Appellate Courts of Illinois, construing the statutes quoted in the petition or establishing or in any way affecting the rights of the parties hereto, may be considered by the McCracken circuit court and the Court of Appeals of Kentucky, on all motions and trials of this case, as though properly plead and proven.
“Either party may cite or produce before the McCracken circuit court or the Court of Appeals of Kentucky, the statutes of the state of Illinois, or the reported decisions of the Supreme Court or the Appellate Courts of the state of Illinois, and it is agreed that the rules of law established by such statutes or such reports of decisions shall be treated in all respects as though properly plead, proven or certified, as required by the laws of the State of Kentucky, and shall be treated as part of the pleadings of this case as though plead in extenso in the petition, answer or other pleadings, and shall be so considered on all motions and trials, in this case.”
Many questions are raised on this appeal, but in view of the conclusion we have reached, it will be necessary for us to consider but one of them. The plaintiff did not in his petition allege that Palmer Utterback left surviving him any widow or next of kin who sustained a pecuniary injury as a result of his death; Plaintiff proved that Palmer Utterback was earning at the time of his death between $3,600 and $4,000 per annum, that he *336was 30 years of age, in good health, and had an expectancy of 34.34 years of further life. The plaintiff was allowed, over the objection of the defendant, to prove that Utterback left surviving him a wife and three children. Thus the plaintiff was allowed to prove that Utterback had left a widow and next of kin, though he had failed to allege that in his petition.
The Supreme Court of Illinois, in the case of Chicago & R. I. R. Co. v. Morris, 26 Ill. 400, held that before a party suing for these damages can be allowed to recover, it must be alleged in the declaration and proved that the deceased left .a widow or next of kin to whom the damages could be distributed. The same question was before that court in the case of Quincy Coal Co. v. Hood’s Adm’rs, 77 Ill. 68, and the court again held the plaintiff is bound to allege there was such person surviving, and under the general issue the burden is upon him of proving it. Again, in the case of Lake Shore & M. S. R. Co. v. Hessions’ Adm’x, 150 Ill. 546, 37 N. E. 905, this question was before the Supreme Court of that state, and it said: “The 18th Instruction asked, stated that there was no averment in either of the first six counts of plaintiff’s declaration, that the deceased, James Hbssions, left a widow and next of kin, and that there could, therefore, be no recovery under either of said counts. The right of action is here given by the Statute for the exclusive benefit of the widow and next of kin. It is the settled law that the fact of survivorship of a widow or next of kin is an essential element of the cause of action, and it is therefore indispensable that it should be alleged and proved. ’ ’ This question was before the Supreme Court of the state in the case of Foster’s Ex’r v. St. Luke’s Hospital, 191 Ill. 94, 60 N. E. 803, and in the opinion the court said: “This court has uniformly held that where an action is brought to recover damages for the death of a person, to entitle the plaintiff to recover it is necessary to allege and prove that such deceased person left him or her surviving a widow or husband or next of kin. ... At the Common Law no action could be maintained for negligently causing the death of a human being, or for any damages suffered by any person in consequence of such death. An action to recover such damages can be maintained, therefore, only by virtue of the statute. ... It must be brought in the name of the personal representative of the deceased, and can only be maintained for the benefit of the persons designated in the statute. If the deceased *337left Mm surviving no widow or next of kin there is no cause of action, hence the necessity of alleging and proving that the deceased left him surviving a widow or next of kin. A declaration defective in this regard would not be good even after verdict. In Bowman v. People, 114 Ill. 474 (2 N. E. 484), it is said (p. 477 [2 N. E. 485]): “The rule is, if the declaration omits to allege any substantial fact which is essential to a right of action, and which is not implied in or inferable from the findings of those which are alleged, a verdict for the plaintiff does not cure the defect.’ ” The effect of these decisions is unmistakable. The Supreme Court of Illinois holds there is no cause of action unless the decedent alleged to have been negligently killed left surviving him a widow or next of kin who would sustain a pecuniary loss by his cleath. As this petition did not contain such an allegation, it follows that no cause of action was stated.
We must now determine if the defendant’s motion for a peremptory instruction was sufficient to raise this question, or must the defendant’s motion for such instruction be treated purely as a demurrer to the evidence? As the plaintiff’s petition failed to state a cause of action, the court erred in overruling the defendant’s demurrer to the petition; but, as the defendant withdrew that demurrer, the record before us now must be treated as though no demurrer had ever been filed. We had a very similar question before us in the case of Illinois Cent. R. Co. v. Doherty’s Adm’r, 153 Ky. 363, 155 S. W. 1119, 47 L. R. A. (N. S.) 31. That was a suit under the Federal Employers’ Liability Act (45 USCA secs. 51-59). The petition failed to allege that the decedent left surviving him any one of the beneficiaries named by that act. The trial resulted in a verdict of $16,000 for the admimstrator. In our opinion in that case, we said: ‘ ‘ The conclusion we have reached makes it unnecessary for us to consider appellant’s objections to the instructions given on the trial. None of them should have been given, but the jury instead, should have been peremptorily instructed to find for the appellant.” It is well settled in this state that proof without pleading is just as unavailing as pleading without proof. See Wright v. Wheat, 224 Ky. 386, 6 S. W. (2d) 458; Ins. Co. v. Gore, 215 Ky. 487, 284 S. W. 1107; Pratt v. York, 197 Ky. 846, 248 S. W. 492. The general rule is well stated by the United States Supreme Court in Cucullu v. Hernandez, 103 U. S. 105, 26 L. Ed. 322, where it is stated: “Evidence to show *338the facts on which this claim is based cannot be regarded, where there is no averment in the bill to which it can be applied.”
If evidence cannot be considered without pleading to support it, then it follows that a motion for a peremptory-instruction tests both the pleading and the evidence. In the case of Horton v. L. & N. R. Co., 199 Ky. 279, 250 S. W. 983, we said: “It is true, as urged, that a motion for a peremptory tests the sufficiency of the pleadings, as well as the evidence.” We cited numerous authorities in support of that, and we had previously held in the case of Bender v. South, 189 Ky. 623, 225 S. W. 504: “A directed verdict is proper when the pleadings or evidence will not support any other verdict. ’ ’
It is urged, however, that in the case of City of Jackson v. Moody, 177 Ky. 844, 847, 198 S. W. 233, 235, w;e modified this rule and said: “Where the motion for peremptory instruction is made at the conclusion of the evidence and is intended as a demurrer thereto, and the attention of the court is not called to the fact that the pleadings are defective, or that an affirmative plea has not been controverted, the better rule seems to be that the party making the motion and who so deftly conceals from the court and opposing counsel the fact that an affirmative plea has not been traversed, should be treated as demurring to the evidence only.”
This observation, however, was purely dictum. The court did not rest its decision upon it, but further in the opinion called attention to the fact that the plaintiff’s petition had been taken as confessed and that the order so adjudging it had never been set aside and was still in full force and effect, and it was upon this that the court rested its affirmance of that judgment, and since it did appear in the record that this petition had been taken for confessed, and the defendant had no right to file an answer, hence nothing the court may have said about the contributory negligence pleaded in that answer is of any binding effect as a precedent. A statement of law in an opinion makes a precedent, not because it is made by a wise and learned man, but because it is made by a judge in his official capacity as a judge and about á matter that is before him as a judge. If it is not so made, it is dictum. The test is whether the statement was or was not necessary to the determination of the issues raised by the record and considered by the court. See Cross v. Burke, 146 U. S. 82, 13 S. Ct. 22, 36 L. Ed. 896; *339Shires v. Allen, 47 Colo. 440, 107 P. 1072. Having reached the conclusion that plaintiff’s petition was'insufficient and that the motion for a peremptory instruction raised the question of its sufficiency, it follows that the peremptory instruction was properly given.
The judgment is affirmed.