concurring.
I concur. I question the statement in the principal opinion that “defenses of res judi-cata and issue preclusion are in essence defenses alleging the plaintiff has failed to state a claim upon which relief may be granted.” Res judicata and estoppel are specifically listed in Rule 55.08 as affirmative defenses which must be pleaded. These defenses, however, often can be established before trial by uncontroverted evidence, and so are appropriate grounds for summary judgment under Rule 74.04.
I also agree that the absence of a hearing on the motion for summary judgment is not material to this case, because there is no indication or suggestion in the brief that a hearing would have brought forth any facts not apparent from the portions of the documentary record of the first trial which are in our record. We, of course, are justified in affirming a judgment if it is correct. The appellant must show not only error but also prejudice.
The judgment is correct because the plaintiff raised an issue before the trial court as to the liability of the Reorganized Church of Jesus Christ of Latter Day Saints on the construction contract. The contract-related claims against the church were resolved adversely to the plaintiff when the court ruled on the church’s motion for directed verdict. When a plaintiff makes claims based on a particular transaction, and the case goes to trial, the plaintiff *503is obliged to set forth all claims and variations arising out of the transaction. All other claims against parties to the litigation which could have been stated in the petition are precluded. The claim as a third-party beneficiary was available at the time the trial began, and should be foreclosed by the adverse ruling on the motion for directed verdict.
I cannot explicitly find that the trial court ruled that the third-party beneficiary claim failed to state a claim, but the trial court was wholly justified in refusing to allow the belated amendment, because of his finding that the defendant church did not consent to the trial of an issue not pleaded. The plaintiff cannot, by an untimely request for leave to amend, avoid the preclusion of a claim arising out of the transaction which is the subject of the trial.
The holding that the plaintiff is precluded is consistent with Rule 67.01, which was amended in 1973 to limit the right of a plaintiff to dismiss a claim voluntarily. Before the amendment the plaintiff could dismiss all or any part of a claim prior to the time the case was submitted to the jury. By the amendment, dismissal after the introduction of evidence requires leave of court, which the plaintiff did not seek in this case. The plaintiffs counsel’s statement before the introduction of evidence that he was going to dismiss the tort claims cannot be taken as a voluntary dismissal of Count I. The plaintiff should not be allowed to bring the contract between the church and the general contractor into litigation, seek relief from the church related to that contract, and then preserve a separate claim against the church relating to the contract, simply by labeling it a tort claim.
I doubt that the third-party beneficiary claim was legally sufficient. Of course, if it did not state a claim, there was no error in denying leave to amend. But there is no need to reach this point.
I agree that the judgment must be affirmed.