Closed kynx closed 11 months ago
Actually I have no idea what should be done here.
Maybe detect if the array contains and keys with an Identifier
for a name and then return a Literal()
for the whole thing, like It did before 4.1.1? That seems kind of kludgy, but it is what I have to do when generating these arrays. @dg any suggestions?
@dg I don't know what to do here. That commit is a major BC break for me. Should I revert the whole thing or are there bits that don't break stuff for people?
It would be lovely if this library could actually handle identifiers as array keys. Maybe I could help with that, given a general plan of action for the a next major. But right now I can no longer round trip classes generated with this library. It needs fixing.
Probably the best way, given backwards compatibility, is to just return the whole array as Literal, the way it used to work…
👍 Many thanks for that!
This PR adds a test to reproduce #143. Not sure if I'm asserting the right thing, but I'll update it if I can figure out a fix.