Pennsylvania and other states and cities fear similar restrictions.

“My reaction was, ‘Yeah, that’s going to play here,’ “ said John D. McGinnis, a lawmaker in Pennsylvania, which has also been diverting money from its pension system, setting the stage for a crisis as more and more public workers retire. The state has no explicit constitutional mandate to protect public pensions, as Illinois does, but that is irrelevant, said Mr. McGinnis, a Republican and former finance professor at Pennsylvania State University.

“The judiciary in Pennsylvania has been solidly of the belief that there are ‘implicit contracts,’ and you can’t deviate from them,” he said. If lawmakers in Harrisburg were to unilaterally cut pensions now, he said, they could be taken to court and be dealt a stinging rebuke, like their counterparts in Illinois.

Against that backdrop, pension obligation bonds may appear tempting, even though such deals have contributed to financial crises in Detroit, Puerto Rico, Illinois and other places.

The deals are generally pitched to state and local officials as an arbitrage play: The government will issue the bonds; the pension system will invest the proceeds; and the investments will earn more, on average, than the interest rate on the bonds. The projected spread between the two rates makes it look as if the government has refinanced its pension shortfall at a lower interest rate, saving vast sums of money.

But that’s just on paper. In reality, the investment-return assumption is just that — an assumption, and a deceptive one at that because it does not take risk into account.