BUFFALO, N.Y. -- A Delaware judge has ruled there is enough evidence to move forward with a class-action lawsuit that claims Tesla's CEO Elon Musk and its board bailed out SolarCity, another Musk-related company, and in doing so breached their obligation to shareholders.

"They're fighting over how the accounting was done and if you did the accounting one way, you got a higher number and if you did the accounting a different way, you got a different number," said Fred Floss, Fiscal Policy Institute senior fellow.

The plaintiffs claim that in 2016, SolarCity had more than $3.5 billion of debt and was in danger of defaulting. Furthermore, it was behind schedule at its new operation at the RiverBend site in Buffalo and facing more than $40 million a year in penalties to New York State if it didn't meet specific benchmarks.

"It's really a discussion of the timing of, why did Tesla do this when he did it and whether this was the best time for Tesla to acquire SolarCity," Floss said.

He said the facts disclosed in the lawsuit are not necessarily bad for Western New York or the state. Floss said they could be seen as proof the clawbacks written into the contract were effective. Furthermore, since the acquisition, Tesla has ramped up production and hiring.

"It does suggest that this is really a cashflow issue, not an economics issue and not whether the project was a good project or not," Floss said. "It really has to do with SolarCity taking on too much debt."

The court documents do point out Tesla nearly doubled its own debt load; however, Floss said the company was better equipped to handle it than SolarCity.

"What they've really done is buy time so that their new technologies can come to fruition and if they're successful, if they've made the right choices, then they should be able to take on their debt structure," he said.

Floss believes the state shouldn't be overly concerned yet about Tesla's financial health but should always have a backup plan ready. He said it helps that New York owns the factory.

"They're there and they allow the state to be at the front of the line if a bankruptcy or other collectors come in. New York State will be there," he said.

Meanwhile, Tesla had this statement on the lawsuit:

“We do not agree with the decision and will be taking appropriate next steps. It’s important to emphasize that this was a motion to dismiss in which the court was required to assume as true all of the allegations that are made in the complaint. We of course contend the allegations in the complaint are false.”