In bankruptcy, employee compensation is a priority claim. These pension contributions are a part of employee compensation.
It’s doubtful that a court decision in favor of CalPERS would have any affect on the credit ratings since it’s always been understood, at least in California, that pensions take priority over unsecured bondholders. If a government entity is a bad credit risk, then that will affect its credit ratings; but it has always been understood in public policy circles (and, presumably, among serious bond investors) that pension funds have priority. This is a topic that has been discussed for decades, so it shouldn’t take anyone by surprise.
One more thing: the battle is not between “taxpayers” and public employees. The notion that taxpayers are going to cover all losses originates from the privatization movement that has been trying to eliminate unions for a long time (so they can take over public assets and revenues, NOT so that they can save taxpayers money). It is primarily bondholders (and other unsecured creditors), not taxpayers, who will take the hit in the event of a bankruptcy.
Naturally, Wall Street — populated by by those in the privatization movement as well as bondholders and other “investors” — wants to strip unions of their rights and reframe this issue as a “taxpayers vs. union” issue as part of their propaganda, but that’s not what it really is. Joe Sixpack will not benefit one single bit by the decimation of unions. To the contrary, it will negatively affect wages and benefits in all other industries because those employers won’t have to compete with public employers (and their better wages and benefits) for employees, and J6 Taxpayer will not see a dime in savings.
The pension reform bill has already addressed many of the problems with CalPERS. Just to be clear, it is not just “taxpayers” who are having to pay for the additional pension contributions, especially after Jerry Brown’s reforms passed. “Taxpayers,” BTW, includes public employees who often pay at least as much, as a percentage of income, as most of the “rich” who are whining the most, because these public employees are W-2 earners and don’t get to fraudulently deduct all of their “business expenses” or get preferential tax treatment like those who have passive earnings.