https://psalm.dev/r/10f4f6860b
While not pretty, the code runs fine and doesn't crash. Are assignments in expressions supported only partially?
Changing $value from mixed to a string produces different errors:
Using a new variable name instead of overwriting $value prevents most errors, but not all:
Yeah, the nested equivalent also works: https://psalm.dev/r/c4c7903340
OK, so I realise I haven't solved most of this, but having spent a good chunk of time on this over the last three days, I've gone as far as I'm able (for now).
I hope to do a bit more tomorrow to get rid of the mixed var issues, though.
Mixed var issues for the and examples are now fixed.
I've made a couple more improvements so that most examples now work.
Thanks!
All examples here now work