A question no one’s asked out loud with regard to the ongoing Illinois state budget negotiations is what happens if — or when — the state becomes unable or unwilling to pay its bills a few years down the road.

It’s clearly on the minds of investors who own Illinois debt: The price of the state’s bonds has been falling and the rating agencies recently downgraded its debt to just one step above junk. Both of these are proximate responses to the state’s budget impasse, which is entering its third year.

But another reason for the growing wariness of investors toward Illinois debt emanates from developments in Puerto Rico, which asked for and received legislation from the federal government to assist with its debt burden.

The recent budget put together by the island’s government- — with the blessing of the congressionally appointed Fiscal Oversight Board — revealed that the commonwealth’s plan to reform its finances is to simply stiff its bondholders. The island’s pensioners are largely held harmless and all other expenditures actually increase.

While bondholders fear — and Illinois’ pensioners would presumably welcome — a similar resolution should Illinois go bust, the more important precedent established by Puerto Rico is that when the federal government gets involved, the state’s constitution will get tossed aside. And that should worry both pensioners and taxpayers.

Puerto Rico’s constitution explicitly declares that its general-obligation bondholders are to be paid ahead of all other obligations. This seemingly iron-clad promise was one reason why it could borrow money for so long at such low rates despite its deteriorating fiscal health. However, more than $2 billion in annual interest payments — 80 percent of what’s due in 2017 — will now be forgone for at least the next five years, constitution be damned.

Illinois’ constitution does not have such a promise to its bondholders, presumably because there is no mechanism for a state to default on its bonds, and none has done so since the Depression. However, Illinois’ constitution does expressly prohibit the state from impairing promised benefits to either current or future pensioners.

If the federal government were to intervene in an Illinois budget crisis, it’s likely that its bondholders will take a hit, but it is also likely that its rigid state pension protections and prohibition of progressive taxation would be on the table as well — both of which the state constitution expressly protects.

Such a scenario may not be too far away: The next recession-cum-stock market correction will cause the state’s tax revenues — as well as its pension fund value — to fall precipitously, the latter probably to a point where no achievable rate of return on the remaining pension funds could achieve solvency. Such a development could make it impossible for the state to borrow money at any rate, and the federal government would be forced to intervene. Should that occur, it’s a safe bet that everyone will share in the pain — taxpayers, bondholders, and public pensioners alike.

The best case for current and former state workers in such a scenario would be the pension reform bill invalidated by the State Supreme Court in 2015, which ended automatic cost of living increases, increased the retirement age and changed the determination of a worker’s final salary for determining pension benefits. But it is easy to see pension adjustments going much further — perhaps via an ex post reduction of benefits of those who spiked their final salaries to boost pensions or a diminution of benefits for those with two or more state pensions.

And once the feds jettison the prohibition on progressive tax rates, Illinois will doubtless come to resemble New Jersey, with top marginal income tax rates approaching 10 percent.

Investors are right to be wary of holding Illinois bonds, but the real lesson from Puerto Rico’s fiscal crisis is that constitutional promises mean nothing once the federal government intercedes. The state’s pensioners and taxpayers should be as worried as the state’s bondholders.