Plaintiff has a contract with Defendant, and goes to trial. The trial lasts four full days. Right before the parties make their closing statements, Plaintiff voluntarily dismisses the lawsuit with prejudice. Defendant moves for its attorney's fees, claiming that it's the prevailing party. The trial court agrees and gives 'em a six-figure fee award.
The Court of Appeal rightly reverses. It may well be a silly rule. But it's nonetheless the law. CCP 581(e) says that the plaintiff can voluntarily dismiss, with prejudice, at any point during the trial, as long as it's not over. And when that happens, there's no "prevailing party." Hence no fee award.
Were I to have the power to rewrite the statute, I would. Sure, it encourages "settlement" (e.g., the abandonment of meritless cases), which enhances efficiency. But at too great a cost. Defendants should be the prevailing party when that stuff happens.
But I have no such power. Nor does the Court of Appeal. The statute says what it says. So the right result is clear.
Which is exactly what the Court of Appeal holds.