Open drealecs opened 3 years ago
I found these snippets:
Actually, I think constants are having more issues... https://psalm.dev/r/ccfde69c1d
If you can point me in the correct direction, I can try to provide a PR, thanks!
I found these snippets:
First issue is related to switch control flow, not really to constants. The second one is different, I'm not sure how much Psalm understands defined
This is somehow more broken than before...
It's actually working fine without the paradoxical condition: https://psalm.dev/r/018a56ccd2
The paradoxical condition somehow forces the constant type to z
instead of x|y|z
. Having a default case without the paradoxical condition works fine too: https://psalm.dev/r/b6c5c2bc95
I found these snippets:
I found these snippets:
Original snippets work as expected now.
Still seems broken: https://psalm.dev/r/762bc01c78
I found these snippets:
while this detects the constant type variance well: https://psalm.dev/r/5adf725aac this another example, without a default does not work well: https://psalm.dev/r/4506f5108a